Jonathon, Please don't use SIGPIPE. That's just a hack from the 1970s to make simple command line programs die when their input goes away. Instead, please call signal(SIGPIPE, SIG_IGN) right inside of main(). Thereafter, Unix APIs like read(), write(), etc will return -1 and errno will be equal to EPIPE.
davez On Jan 6, 2011, at 1:22 PM, Jonathon Kuo wrote: > On Jan 6, 2011, at 1:15 PM, Fritz Anderson wrote: > >> Taking "by value" to mean "as many uninterpreted bits as will fit into a >> variable of type void*," yes. > > On Jan 6, 2011, at 1:14 PM, Dave Zarzycki wrote: > >> Yes, that is the nature of void *. Nothing can be known about a void * other >> than the value – therefore you can store anything there (even non-pointers >> as long as they are <= sizeof(void *)). > > Awesome! I get it now. This all came about because I am getting an occasional > SIGPIPE when one of my read sources is closed on the client end, so having a > context is great. Thanks!! > > BTW, is there an inherent signal-handling capability with GCD so my program > doesn't get blown out of the water when a SIGPIPE happens? > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/zarzycki%40apple.com > > This email sent to zarzy...@apple.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com