in reply to Re: Processes clobbering each other
in thread Processes clobbering each other
So if one program says "aaa\nbbb\n" and the other says "ccc\nddd\n", in principle you may get "aaca\nbcbb\nc\nddd\n".
No, that is guaranteed not to happen. Unix pipes will not break up a single write(2) request to a pipe if it is smaller than the system buffer size for pipes (at least 512 bytes, perhaps more like 4kB). So unless you somehow manager to take more than one write(2) to output the "aaa\n", then it will not get any other data interleaved inside of it.
To get Perl to use more that one write(2) when outputting "aaa\n" you'd have to set $| to a true value and use more than one Perl statement to output those 4 characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Processes clobbering each other (atoms)
by thospel (Hermit) on Nov 24, 2003 at 23:23 UTC | |
|
Re: Re^2: Processes clobbering each other (atoms)
by mcogan1966 (Monk) on Nov 25, 2003 at 13:54 UTC |