El Lunes, 11 de Enero de 2010, Gary Wright escribi
> On Jan 10, 2010, at 11:17 AM, Iki Baz Castillo wrote:
> > I tested it (in ruby) by sending strings of 10 bytes size from various
> > processes to a shared pipe. The reader gets the strings mixed :)
> > However this doesn't occur with posix message queues.
> 
> I just tried this on Mac OS X using threads and using forks to write to
> a shared pipe.  Each write was 256 bytes done using syswrite.  All the
> reads on the other end were: sysread(256).  I tried using forked writers
> and simple Ruby threads.  Each writer wrote 10000 messages and I didn't
> get any mixed up data in any of my tests.  I also tried using plain
> old write (vs. syswrite) and still didn't get any mixed up data.
> 
> The behavior you described just doesn't match my experience or
> understanding of pipes.

I got the mixed strings using a name pipe (created with "mkfifo" command) and 
shared by two different Ruby programs (a writer and a reader).

However I don't know if I've modified something since that test but the fact 
is that I don't get the mixed strings...


-- 
Iki Baz Castillo <ibc / aliax.net>