Commit Diff


commit - bf8b64630443b2bd3fe2a298f860ea0d492df649
commit + 7b5e2fe38e7af696155e687924462c4b9fe951bc
blob - 75c1aaf1a0ba6dbfbb2f7abdfd8c91e01c76c8cf
blob + 3eb3d8042edc0967bd19f1a7251a710850e4139d
--- src/ngircd/proc.c
+++ src/ngircd/proc.c
@@ -93,10 +93,11 @@ GLOBAL void
 Proc_Kill(PROC_STAT *proc)
 {
 	assert(proc != NULL);
-	assert(proc->pipe_fd >= 0);
 
-	io_close(proc->pipe_fd);
-	kill(proc->pid, SIGTERM);
+	if (proc->pipe_fd > 0)
+		io_close(proc->pipe_fd);
+	if (proc->pid > 0)
+		kill(proc->pid, SIGTERM);
 	Proc_InitStruct(proc);
 }