/*----- Static variables --------------------------------------------------*/
static pid_t kid = -1;
+static sig sig_chld;
/*----- Fetching a tunnel file descriptor ---------------------------------*/
* Use: Notices and reports child process death.
*/
-static void reap(int sig)
+static void reap(int sig, void *p)
{
pid_t k;
int st;
if (!helper) helper = PRIVSEP_HELPER;
fdflags(fd[0], 0, 0, FD_CLOEXEC, FD_CLOEXEC);
fdflags(fd[1], 0, 0, FD_CLOEXEC, FD_CLOEXEC);
- signal(SIGCHLD, reap);
+ sig_add(&sig_chld, SIGCHLD, reap, 0);
kid = fork();
if (kid == 0) {
signal(SIGCHLD, SIG_DFL);