X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fproc.c;h=e062cd0b7c702494a3992e8bfe1beab2a348113a;hb=7faa3ed7d6613f23e998604461f543e763278f7e;hp=fd2df1d947c51a773a9447a04e159e4a15afd8a4;hpb=69803d6ff1ac8deb95e023bda6ad2aef435dc69a;p=ngircd-alex.git diff --git a/src/ngircd/proc.c b/src/ngircd/proc.c index fd2df1d9..e062cd0b 100644 --- a/src/ngircd/proc.c +++ b/src/ngircd/proc.c @@ -79,7 +79,6 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout signal(SIGALRM, Proc_GenericSignalHandler); close(pipefds[0]); alarm(timeout); - Conn_CloseAllSockets(); return 0; } @@ -155,7 +154,10 @@ Proc_Read(PROC_STAT *proc, void *buffer, size_t buflen) GLOBAL void Proc_Close(PROC_STAT *proc) { - io_close(proc->pipe_fd); + /* Close socket, if it exists */ + if (proc->pipe_fd >= 0) + io_close(proc->pipe_fd); + Proc_InitStruct(proc); }