lib/process.c
/* Initializes the process subsystem (if it is not already initialized).  Calls
 * exit() if initialization fails.
 *
 * This function may not be called after creating any additional threads.
 *
 * Calling this function is optional; it will be called automatically by
 * process_start() if necessary.  Calling it explicitly allows the client to
 * prevent the process from exiting at an unexpected time. */
Initializes the process subsystem (if it is not already initialized).  Calls
exit() if initialization fails.

This function may not be called after creating any additional threads.

Calling this function is optional; it will be called automatically by
process_start() if necessary.  Calling it explicitly allows the client to
prevent the process from exiting at an unexpected time.
Initializes the process subsystem ( if it is not already initialized ) . Calls exit () if initialization fails . This function may not be called after creating any additional threads . Calling this function is optional ; it will be called automatically by process_start () if necessary . Calling it explicitly allows the client to prevent the process from exiting at an unexpected time .
void
process_init(void)
{
#ifndef _WIN32
    static bool inited;
    struct sigaction sa;
    assert_single_threaded();
    if (inited) {
        return;
    }
    inited = true;
    xpipe_nonblocking(fds);
    memset(&sa, 0, sizeof sa);
    sa.sa_handler = sigchld_handler;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = SA_NOCLDSTOP | SA_RESTART;
    xsigaction(SIGCHLD, &sa, NULL);
#endif
}
void process_init ( void ) { #ifndef _WIN32 static bool inited ; struct sigaction sa ; assert_single_threaded ( ) ; if ( inited ) { return ; } inited = true ; xpipe_nonblocking ( fds ) ; memset ( & sa , 0 , sizeof sa ) ; sa . sa_handler = sigchld_handler ; sigemptyset ( & sa . sa_mask ) ; sa . sa_flags = SA_NOCLDSTOP | SA_RESTART ; xsigaction ( SIGCHLD , & sa , NULL ) ; #endif }
Initializes the process subsystem (if it is not already initialized).
Initializes the process subsystem ( if it is not already initialized ) .
/* Create notification pipe. */ /* Set up child termination signal handler. */