* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
-
-#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 <signal.h>
#ifdef HAVE_SIGACTION
#include <string.h>
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);