#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
+#include <limits.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
::sigemptyset(&cldsig);
LIBC_CALL( ::sigaddset, (&cldsig, SIGCHLD) );
LIBC_CALL( ::sigprocmask, (SIG_BLOCK, &cldsig, &oldsig) );
+
+ if (! senf::scheduler::empty() )
+ std::cerr <<
+ "\n"
+ "*** WARNING ***\n"
+ "Scheduler not empty before fork(). THIS MUST NOT HAPPEN.\n"
+ "The scheduler will be reinitialized by the fork() and lose all registrations.\n"
+ "*** WARNING ***\n"
+ "\n";
LIBC_CALL_RV( pid, ::fork, () );
: childPid_(pid), coutpipe_(coutpipe), cerrpipe_(cerrpipe), stdout_(stdout),
stderr_(stderr), sigChld_(false),
cldSignal_ (SIGCHLD, senf::membind(&DaemonWatcher::sigChld, this)),
- timer_ ("DaemanWatcher watchdog", senf::membind(&DaemonWatcher::childOk, this)),
+ timer_ ("senf::detail::DaemonWatcher::childOk", senf::membind(&DaemonWatcher::childOk, this)),
coutForwarder_(coutpipe_, boost::bind(&DaemonWatcher::pipeClosed, this, 1)),
cerrForwarder_(cerrpipe_, boost::bind(&DaemonWatcher::pipeClosed, this, 2))
{
prefix_ senf::detail::DaemonWatcher::Forwarder::Forwarder(int src, Callback cb)
: src_(src), cb_(cb),
- readevent_("DaemanWatcher::Forwarder", senf::membind(&Forwarder::readData, this),
+ readevent_("senf::detail::DaemonWatcher::Forwarder::readevent", senf::membind(&Forwarder::readData, this),
src_, scheduler::FdEvent::EV_READ)
{}