summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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;