]>
Commit | Line | Data |
---|---|---|
7526fd86 | 1 | --- bash-3.0/jobs.c.jobs 2004-09-08 16:07:25.081427747 +0100 |
2 | +++ bash-3.0/jobs.c 2004-09-08 16:18:06.698604033 +0100 | |
3 | @@ -2475,6 +2475,7 @@ | |
4 | PROCESS *child; | |
5 | pid_t pid; | |
6 | int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; | |
7 | + static int wcontinued_not_supported = 0; | |
8 | ||
9 | call_set_current = children_exited = 0; | |
10 | last_stopped_job = NO_JOB; | |
11 | @@ -2488,7 +2489,15 @@ | |
12 | : 0; | |
13 | if (sigchld || block == 0) | |
14 | waitpid_flags |= WNOHANG; | |
15 | + retry: | |
16 | + if (wcontinued_not_supported) | |
17 | + waitpid_flags &= ~WCONTINUED; | |
18 | pid = WAITPID (-1, &status, waitpid_flags); | |
63a14661 | 19 | + if ((pid == -1) && (errno == EINVAL)) |
7526fd86 | 20 | + { |
21 | + wcontinued_not_supported = 1; | |
22 | + goto retry; | |
23 | + } | |
24 | ||
25 | /* The check for WNOHANG is to make sure we decrement sigchld only | |
26 | if it was non-zero before we called waitpid. */ |