Re: ignore(SIGPIPE) in gsm




> Before each write(), writev(), pwrite() or whatever, check that
> descriptor's control variable. This brings an additional overhead,
> but it's not even near the one you'd get with an additional kernel call.
> And I suppose there is already a wrapper around writes because of
> EINTR, since SA_RESTART is not generally available.

If you install a signal handler you do not need to keep any
information in sync like this setup you are proposing: write will
return EPIPE.

Miguel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]