diff options
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/socket.c b/src/socket.c index 7ba231a..78efc97 100644 --- a/src/socket.c +++ b/src/socket.c @@ -865,9 +865,13 @@ void ReceiveMsg(void) close(s); } else queryflag = -1; - - Kill(m.m.command.apid, (queryflag >= 0) ? SIGCONT : SIG_BYE); /* Send SIG_BYE if an error happened */ - queryflag = -1; + if (CheckPid(m.m.command.apid)) { + Msg(0, "Query attempt with bad pid(%d)!", m.m.command.apid); + } + else { + Kill(m.m.command.apid, (queryflag >= 0) ? SIGCONT : SIG_BYE); /* Send SIG_BYE if an error happened */ + queryflag = -1; + } } break; case MSG_COMMAND: |