X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=packages%2Fbase%2Fbash%2Favoid_wcontinued.patch;fp=packages%2Fbase%2Fbash%2Favoid_wcontinued.patch;h=cd85f4765e35bd3a94d6b4b45753c002442c7fe7;hb=e6cbadee3fa9e3e04c70d6d652a64d7025936695;hp=0000000000000000000000000000000000000000;hpb=51af0580ff316ad09d5b5d2f5fe7e9194c74f475;p=hdw-linux%2Fhdw-linux.git diff --git a/packages/base/bash/avoid_wcontinued.patch b/packages/base/bash/avoid_wcontinued.patch new file mode 100644 index 0000000..cd85f47 --- /dev/null +++ b/packages/base/bash/avoid_wcontinued.patch @@ -0,0 +1,27 @@ +diff -Naur bash-3.0.orig/jobs.c bash-3.0/jobs.c +--- ./jobs.c 2004-10-12 08:50:11.643481280 +0000 ++++ ./jobs.c 2004-10-12 08:51:35.110792320 +0000 +@@ -2476,6 +2476,7 @@ + PROCESS *child; + pid_t pid; + int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; ++ static int wcontinued_not_supported = 0; + + call_set_current = children_exited = 0; + last_stopped_job = NO_JOB; +@@ -2489,7 +2490,15 @@ + : 0; + if (sigchld || block == 0) + waitpid_flags |= WNOHANG; ++ retry: ++ if (wcontinued_not_supported) ++ waitpid_flags &= ~WCONTINUED; + pid = WAITPID (-1, &status, waitpid_flags); ++ if (pid == -1 && errno == EINVAL) ++ { ++ wcontinued_not_supported = 1; ++ goto retry; ++ } + + /* The check for WNOHANG is to make sure we decrement sigchld only + if it was non-zero before we called waitpid. */