summaryrefslogtreecommitdiffstats
path: root/qarshd.c
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2010-06-03 13:53:37 -0400
committerNathan Straz <nstraz@redhat.com>2010-06-03 13:53:37 -0400
commitfd9fd5aa2ce8ec78d362608dc09ba17ca8c61c35 (patch)
tree98eee74fb6b77d7ece5287f0414fcc59f370376d /qarshd.c
parent43a7a8d0852bbb4d0d6684dffbda3b97c8473386 (diff)
downloadqarsh-fd9fd5aa2ce8ec78d362608dc09ba17ca8c61c35.tar.gz
qarsh-fd9fd5aa2ce8ec78d362608dc09ba17ca8c61c35.tar.xz
qarsh-fd9fd5aa2ce8ec78d362608dc09ba17ca8c61c35.zip
Set child_pid to 0 after child returns
This is mostly for clarity while debugging qarshd.
Diffstat (limited to 'qarshd.c')
-rw-r--r--qarshd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qarshd.c b/qarshd.c
index 345f6de..ec5d1f7 100644
--- a/qarshd.c
+++ b/qarshd.c
@@ -275,6 +275,7 @@ handle_packets(int infd)
if (child_exitted) {
waitpid(child_pid, &child_status, 0);
child_exitted--;
+ child_pid = 0;
rp = make_qp_cmdexit(child_pid, child_status);
send_packet(fileno(stdout), rp);
qpfree(rp);