in reply to deterministic fork
While my honorable brethren are of course totally right, I'd also like to point out that for the sole purpose of getting the example to work according to your expectations you might take advantage of the line buffering behavior of standard output and just print your stuff in one line. Then turn off buffering/change output device and everything goes southwest again.
The moral is that if you want serial access to a shared resource - this is the general problem you are after - you either:
OR
OR
Cheers,
alf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: deterministic fork
by falcon (Initiate) on Oct 20, 2001 at 07:18 UTC |