]> git.itanic.dy.fi Git - rrdd/blobdiff - process.c
Convert rrdtool to use work queues instead of forks
[rrdd] / process.c
index 77ec174945b109872163a96f2786f421f244bed6..8d3d18fdd94de8776b5ee7e8882b7159c98a84e2 100644 (file)
--- a/process.c
+++ b/process.c
@@ -340,12 +340,6 @@ int init_jobcontrol(int max_jobs_requested)
        sigemptyset(&sigmask);
        sigaddset(&sigmask, SIGCHLD);
 
-       /* Block SIGCHLD so that it becomes readable via signalfd */
-       ret = sigprocmask(SIG_BLOCK, &sigmask, NULL);
-       if (ret < 0) {
-               pr_err("Failed to sigprocmask: %m\n");
-       }
-
        signal_handler.fd = signalfd(-1, &sigmask, SFD_CLOEXEC);
        if (job_request_handler.fd < 0) {
                pr_err("Failed to create signal_fd: %m\n");
@@ -398,15 +392,6 @@ no_count_cpus:
        for (i = 0; i < max_jobs; i++)
                pthread_create(&thread[i], NULL, worker_thread, (void *)i);
 
-       /*
-        * Magic sleep. There are too many fork() calls at the moment
-        * so we must ensure our threads don't print anything out
-        * while a fork() is executed. Otherwise the child will
-        * inherit glibc internal locks while they are locked, and
-        * function calls such as printf will deadlock.
-        */
-       sleep(1);
-
        return 0;
 }