source: scripts/patches/bash-3.0-avoid_WCONTINUED-1.patch@ 02ca91d

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 02ca91d was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[617118d]1Submitted By: Jeremy Utley <jeremy@linuxfromscratch.org>
2Date: 2004-10-13
3Initial Package Version: 3.0
4Upstream Status: Submitted Upstream
5Origin: Originally created by Greg Schafer
6Description: Bash-3.0 has a execution problem with newer Glibc's. This patch,
7submitted to bash-bugs by Tim Waugh, fixes the problem. See:
8http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00081.html
9Patch also contains a slight code change taken from Fedora SRPM.
10
11
12diff -Naur bash-3.0.orig/jobs.c bash-3.0/jobs.c
13--- bash-3.0.orig/jobs.c 2004-10-12 08:50:11.643481280 +0000
14+++ bash-3.0/jobs.c 2004-10-12 08:51:35.110792320 +0000
15@@ -2476,6 +2476,7 @@
16 PROCESS *child;
17 pid_t pid;
18 int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
19+ static int wcontinued_not_supported = 0;
20
21 call_set_current = children_exited = 0;
22 last_stopped_job = NO_JOB;
23@@ -2489,7 +2490,15 @@
24 : 0;
25 if (sigchld || block == 0)
26 waitpid_flags |= WNOHANG;
27+ retry:
28+ if (wcontinued_not_supported)
29+ waitpid_flags &= ~WCONTINUED;
30 pid = WAITPID (-1, &status, waitpid_flags);
31+ if (pid == -1 && errno == EINVAL)
32+ {
33+ wcontinued_not_supported = 1;
34+ goto retry;
35+ }
36
37 /* The check for WNOHANG is to make sure we decrement sigchld only
38 if it was non-zero before we called waitpid. */
Note: See TracBrowser for help on using the repository browser.