summaryrefslogtreecommitdiff
path: root/tools/hi-q.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-17 20:05:15 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-17 20:05:15 (GMT)
commit3c8d12e783a7051d4ea315c32214cd44992b9239 (patch)
tree1d735be91a57b6508d20124627c0639045c40da1 /tools/hi-q.c
parentb16e4e6879bac1a899d7b54234ee120b21c18607 (diff)
fix commented-out bug; clarify variable-name
Diffstat (limited to 'tools/hi-q.c')
-rw-r--r--tools/hi-q.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/hi-q.c b/tools/hi-q.c
index 7215b0c..237dbd5 100644
--- a/tools/hi-q.c
+++ b/tools/hi-q.c
@@ -424,7 +424,7 @@ int main(int argc, char** argv) {
cerr << endl;
}
- pid_t special_kid = kidpid[nkids-1];
+ pid_t special_pid = kidpid[nkids-1];
int alive(nkids-1); // not counting the special kid
int best_blame(0); // best reason, even if not a great reason
pid_t argbest_blame(-1); // kid# associated with best blame
@@ -432,7 +432,7 @@ int main(int argc, char** argv) {
for (;;) {
if (alive == 0) break;
pid_t somekid = waitpid(-1, &kidstatus, WUNTRACED);
- if (somekid == special_kid){
+ if (somekid == special_pid){
// do not decrement the "alive" counter
// since that only applies to non-special kids
if (WIFEXITED(kidstatus)) {
@@ -510,13 +510,8 @@ int main(int argc, char** argv) {
// now that the envelope information has been transfered,
// wait for the last kid in the usual way
{
-
-#ifdef moretesting
-fprintf(stderr, "About to wait for kid #%d (%d)\n",
- special_kid, kidpid[special_kid]);
-#endif
for(;;) {
- waitpid(special_kid, &kidstatus, WUNTRACED);
+ waitpid(special_pid, &kidstatus, WUNTRACED);
if (WIFEXITED(kidstatus)) {
int sts = WEXITSTATUS(kidstatus);
cerr << "hi-q ends with status: " << sts << endl;