/[make]/make/job.c
ViewVC logotype

Diff of /make/job.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.160 by psmith, Fri Nov 12 21:30:20 2004 UTC revision 1.161 by psmith, Fri Apr 8 12:51:20 2005 UTC
# Line 525  child_handler (int sig UNUSED) Line 525  child_handler (int sig UNUSED)
525    
526  extern int shell_function_pid, shell_function_completed;  extern int shell_function_pid, shell_function_completed;
527    
528    static int reap_lock = 0;
529    
530  /* Reap all dead children, storing the returned status and the new command  /* Reap all dead children, storing the returned status and the new command
531     state (`cs_finished') in the `file' member of the `struct child' for the     state (`cs_finished') in the `file' member of the `struct child' for the
532     dead child, and removing the child from the chain.  In addition, if BLOCK     dead child, and removing the child from the chain.  In addition, if BLOCK
# Line 545  reap_children (int block, int err) Line 547  reap_children (int block, int err)
547  # define REAP_MORE dead_children  # define REAP_MORE dead_children
548  #endif  #endif
549    
550      if (reap_lock)
551        fatal (NILF, _("INTERNAL: reap_children invoked while reap_lock set."));
552    
553    /* As long as:    /* As long as:
554    
555         We have at least one child outstanding OR a shell function in progress,         We have at least one child outstanding OR a shell function in progress,
# Line 1470  start_waiting_job (struct child *c) Line 1475  start_waiting_job (struct child *c)
1475      }      }
1476    
1477    /* Start the first command; reap_children will run later command lines.  */    /* Start the first command; reap_children will run later command lines.  */
1478      reap_lock = 1;
1479    start_job_command (c);    start_job_command (c);
1480    
1481    switch (f->command_state)    switch (f->command_state)
# Line 1500  start_waiting_job (struct child *c) Line 1506  start_waiting_job (struct child *c)
1506        break;        break;
1507      }      }
1508    
1509      reap_lock = 0;
1510    
1511    return 1;    return 1;
1512  }  }
1513    

Legend:
Removed from v.1.160  
changed lines
  Added in v.1.161

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26