Fifo close at the same time as a blocked read. 10.3 vs 10.4, which one is "right"?
Fifo close at the same time as a blocked read. 10.3 vs 10.4, which one is "right"?
- Subject: Fifo close at the same time as a blocked read. 10.3 vs 10.4, which one is "right"?
- From: "Corey O'Connor" <email@hidden>
- Date: Mon, 9 May 2005 17:44:09 -0700
While I no longer rely on this behavior, I noticed a difference
between 10.3 and 10.4 on the same fifo code. The 10.4 behavior seems
more unfriendly than the 10.3 code, but I'm unsure which one is
actually behaving "right".
The code opens a fifo, then branches into 2 threads. One thread does
some stuff, then calls close on the fifo. The other thread repeatedly
reads from the fifo until some error occurs. All read/writes are
blocking.
The difference is what happens when the fifo is closed while the read
is blocked. Under 10.3 the close() succeeds, but the read() remains
blocked. The program can be terminated with a SIGTERM however. Under
10.4 the close() blocks, and the program requires a SIGKILL to,
eventually, terminate.
Example code is here:
http://homepage.mac.com/funkmonkey256/FileSharing4.html
The "close on blocked read example.zip".
--
-Corey O'Connor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden