X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fproc.c;h=e062cd0b7c702494a3992e8bfe1beab2a348113a;hp=7addb47ef30c804e889b6a49d390e2505ae8e1b2;hb=a14eb495b75c8c2a2a32ddb6eecf50dc174f811c;hpb=30796698a9fca0037ea48f70ceafac1e783d06fb diff --git a/src/ngircd/proc.c b/src/ngircd/proc.c index 7addb47e..e062cd0b 100644 --- a/src/ngircd/proc.c +++ b/src/ngircd/proc.c @@ -154,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); }