mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.4 KiB

  1. Patch copied from: http://www.linuxfromscratch.org/lfs/view/development/chapter03/patches.html
  2. -stf
  3. Submitted By: Jeremy Utley <jeremy@linuxfromscratch.org>
  4. Date: 2004-10-13
  5. Initial Package Version: 3.0
  6. Upstream Status: Submitted Upstream
  7. Origin: Originally created by Greg Schafer
  8. Description: Bash-3.0 has a execution problem with newer Glibc's. This patch,
  9. submitted to bash-bugs by Tim Waugh, fixes the problem. See:
  10. http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00081.html
  11. Patch also contains a slight code change taken from Fedora SRPM.
  12. diff -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. call_set_current = children_exited = 0;
  21. last_stopped_job = NO_JOB;
  22. @@ -2489,7 +2490,15 @@
  23. : 0;
  24. if (sigchld || block == 0)
  25. waitpid_flags |= WNOHANG;
  26. + retry:
  27. + if (wcontinued_not_supported)
  28. + waitpid_flags &= ~WCONTINUED;
  29. pid = WAITPID (-1, &status, waitpid_flags);
  30. + if (pid == -1 && errno == EINVAL)
  31. + {
  32. + wcontinued_not_supported = 1;
  33. + goto retry;
  34. + }
  35. /* The check for WNOHANG is to make sure we decrement sigchld only
  36. if it was non-zero before we called waitpid. */