X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3824a6c0417a551961d1a1bf4f94f10eff736afc..refs/pull/482/head:/setsignal.c diff --git a/setsignal.c b/setsignal.c index a8d89325..4d93cebf 100644 --- a/setsignal.c +++ b/setsignal.c @@ -19,20 +19,11 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include - - -#include "interface.h" - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/setsignal.c,v 1.10 2003-11-15 00:39:45 guy Exp $ (LBL)"; -#endif +#include #include #ifdef HAVE_SIGACTION @@ -82,6 +73,8 @@ RETSIGTYPE memset(&new, 0, sizeof(new)); new.sa_handler = func; + if (sig == SIGCHLD) + new.sa_flags = SA_RESTART; if (sigaction(sig, &new, &old) < 0) return (SIG_ERR); return (old.sa_handler);