Hello,

About a month ago I posted a question to the list about
ping being broken the second time you ran it.  The
problem seemed to be related to the shell I was using
(msh).  I was finally able to get back to this problem
and find a fix.

Earlier this year a message was posted to the busybox
mailing list that solved the problem:

http://www.busybox.net/lists/busybox/2008-February/030260.html

After integrating this patch, I have been able to run
ping without any failures.

Attached is a reformatted patch.

Best regards,
Matt

ps. - I noticed this patch hasn't been accepted into the
busybox base, but saving the signal state does seem like
a good idea.
diff -ruN busybox.orig/shell/msh.c busybox/shell/msh.c
--- busybox.orig/shell/msh.c	2008-05-25 23:10:27.000000000 -0600
+++ busybox/shell/msh.c	2008-10-23 16:19:04.000000000 -0600
@@ -784,7 +784,7 @@
 static void fail(void) ATTRIBUTE_NORETURN;
 static void fail(void)
 {
-	longjmp(failpt, 1);
+	siglongjmp(failpt, 1);
 	/* NOTREACHED */
 }
 
@@ -1336,9 +1336,9 @@
 	execflg = 0;
 
 	failpt = m1;
-	setjmp(failpt);		/* Bruce Evans' fix */
+	sigsetjmp(failpt, 0);	/* Bruce Evans' fix */
 	failpt = m1;
-	if (setjmp(failpt) || yyparse() || intr) {
+	if (sigsetjmp(failpt, 0) || yyparse() || intr) {
 		DBGPRINTF(("ONECOMMAND: this is not good.\n"));
 
 		while (global_env.oenv)
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to