Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] glibc snapshot 20041101 bad

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Robin Cook <rcook AT wyrms.net>
  • To: Wolfgang Scheicher <worf AT sbox.tu-graz.ac.at>
  • Cc: Source Mage - Discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] glibc snapshot 20041101 bad
  • Date: Sat, 06 Nov 2004 09:24:00 -0600

This is a patch that will fix bash 3.0 with the newer glibc's. It is
from Linux From Scratch. I was having the same problem and this fixed
it. Luckily I had a terminal window open with the old bash so I was
able to get it working again.

I was going to update the devel grimoire with it but perforce has been
down.

CuZnDragon
Robin Cook

On Sat, 2004-11-06 at 13:26 +0100, Wolfgang Scheicher wrote:
> We use glibc snapshots for a long time, and every now and then it's time to
> update. The last stable glibc release was unusable, but the snapshot from
> 20040628 seems to be quite fine.
>
> I just did some experimenting, and tested a new snapshot. And it took me
> quite
> some hours to find out that this is a bad one:
>
> glib snapshot 20041101 does break things!
>
> That version builds and works fine. No problems noticeable.
> BUT: after rebuilding bash commands like "ls" do hang or segfault.
>
> I don't know what exactely happened, but it took me allready hours to find
> out
> the above. ( rebuild A, rebuild B, and then C won't work )
> I posted this so not everybody else who is insane enough to test other
> glibc
> snapshots has to suffer the same.
>
> Worf
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
>
Submitted By: Jeremy Utley <jeremy AT linuxfromscratch.org>
Date: 2004-10-13
Initial Package Version: 3.0
Upstream Status: Submitted Upstream
Origin: Originally created by Greg Schafer
Description: Bash-3.0 has a execution problem with newer Glibc's.  This patch,
submitted to bash-bugs by Tim Waugh, fixes the problem.  See:
http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00081.html
Patch also contains a slight code change taken from Fedora SRPM.


diff -Naur bash-3.0.orig/jobs.c bash-3.0/jobs.c
--- bash-3.0.orig/jobs.c	2004-10-12 08:50:11.643481280 +0000
+++ bash-3.0/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. */

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.24.

Top of Page