On Monday, 27 בJune 2011 11:31:48 Eli Billauer wrote:
> Shachar Shemesh wrote:
> 
> > Nobody expects ENODEV on an already opened device. I'd go for EIO, 
> > myself.
> And so shall I. Thanks.
> ...
> And the truth is that I don't care about recovering from such an error. 

Another strategy is to throw SIGPIPE at the relevant processes:
 * Con: it is usually expected upon write(2) not read(2) et-al.

 * Pros:
   - At least for write(2) the semantics is natural -- no more writes
     on this file descriptor.

   - Kills the offending process by default.

   - Process may catch it in a signal handler (easy to write some
     global cleanup + exit code)

Cheers,

-- 
Oron Peled                                 Voice: +972-4-8228492
[email protected]                  http://users.actcom.co.il/~oron
Lottery: A tax on people who are bad at math.
_______________________________________________
Haifux mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux

Reply via email to