return size >= 0 ? rsrv : NULL;
}
-#ifdef SIGPIPE
-static void ignoresig(int sig)
-{
- signal(sig, ignoresig);
-}
-#endif
-
/**
* @param f
* @param fd
if (p->sigp) {
Sfsignal_f handler;
- if ((handler = signal(SIGPIPE, ignoresig)) != SIG_DFL &&
- handler != ignoresig)
+ if ((handler = signal(SIGPIPE, SIG_IGN)) != SIG_DFL && handler != SIG_IGN)
signal(SIGPIPE, handler); /* honor user handler */
_Sfsigp += 1;
}
#ifdef SIGPIPE
if (p->sigp && (_Sfsigp -= 1) <= 0) {
Sfsignal_f handler;
- if ((handler = signal(SIGPIPE, SIG_DFL)) != SIG_DFL &&
- handler != ignoresig)
+ if ((handler = signal(SIGPIPE, SIG_DFL)) != SIG_DFL && handler != SIG_IGN)
signal(SIGPIPE, handler); /* honor user handler */
_Sfsigp = 0;
}