Potentially wrong: call to signal() doesn't check for errors

From: Evgeny Kotsuba <evgen__k@dont-contact.us>
Date: Sun, 06 Feb 2005 02:40:17 +0300

Hi,

One more potential rakes with sqiuid: call to signal() doesn't
check for errors

\src\tools.c ->squid_signal(int sig, SIGHDLR * func, int flags)

---------------8<--------------
#else
     signal(sig, func);
#endif
---------------8<--------------
I propose to change it to something like:
#else
     if (SIG_ERR == signal(sig, func))
        debug(50, 0) ("WARNING: signal: sig=%d func=%p: %s\n", sig, func,
xstrerror());
#endif

SY,
Evgeny Kotsuba
Received on Sat Feb 05 2005 - 16:40:20 MST

This archive was generated by hypermail pre-2.1.9 : Fri Feb 25 2005 - 12:00:03 MST