]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/proc.c
New function Conn_CloseAllSockets() to close all open sockets
[ngircd-alex.git] / src / ngircd / proc.c
index f5438834c1842fa3453b6cc6da62a817e3fd9042..1e8cac36eea9d92a9eea14ba0b4797e5cbe3a063 100644 (file)
@@ -66,6 +66,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short))
                return -1;
        case 0:
                /* New child process: */
+               signal(SIGTERM, Proc_GenericSignalHandler);
                close(pipefds[0]);
                return 0;
        }
@@ -118,6 +119,8 @@ Proc_GenericSignalHandler(int Signal)
 
 /**
  * Read bytes from a pipe of a forked child process.
+ * In addition, this function makes sure that the child process is dead
+ * after all data has been read or a fatal error occurred.
  */
 GLOBAL size_t
 Proc_Read(PROC_STAT *proc, void *buffer, size_t buflen)