From 372729c9aa74e89d78dc0ab1a6d18a817f3ec6eb Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 20 Mar 2011 01:34:13 +0000 Subject: ignore SIGCHLD in main process Signed-off-by: Michael Krelin --- (limited to 'src') diff --git a/src/eyefiworker.cc b/src/eyefiworker.cc index d87c36e..4038658 100644 --- a/src/eyefiworker.cc +++ b/src/eyefiworker.cc @@ -1,4 +1,4 @@ -#include +#include #include #include "eyefiworker.h" @@ -10,8 +10,8 @@ eyefiworker::eyefiworker() int eyefiworker::run(int port) { if(!soap_valid_socket(bind(0,port,5))) throw std::runtime_error("failed to bind()"); + signal(SIGCHLD,SIG_IGN); while(true) { - while(waitpid(-1,0,WNOHANG)>0); if(!soap_valid_socket(accept())) throw std::runtime_error("failed to accept()"); pid_t p = fork(); -- cgit v0.9.0.2