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 |
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, |
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) |
1506 |
break; |
break; |
1507 |
} |
} |
1508 |
|
|
1509 |
|
reap_lock = 0; |
1510 |
|
|
1511 |
return 1; |
return 1; |
1512 |
} |
} |
1513 |
|
|