Hello,

Using Plan 9 Port (tip), I was having problem with an rc script running from 
listen1. Exit status of external programs was not updating $status if ran  
under listen1, but worked correctly when ran without listen1. Some stracing 
around shows wait4()s return error in the former case, apparently because 
SIGCHLD handler is set to SIG_IGN by listen1 and not updated by rc.

It seems the  function
src/lib9/notify.c:/^noteinit
does not handle SIG_IGN correctly. Attached patch attempts to solve it.


Also, this is my first post there. Hi and hello, I'm an average linux user, and 
a Plan 9 fan in the making. Thank you a lot for useful software :)


Regards,

dexen
diff -r 74392a7c323c src/lib9/notify.c
--- a/src/lib9/notify.c	Wed Mar 11 13:37:29 2009 -0700
+++ b/src/lib9/notify.c	Wed May 13 00:52:05 2009 +0200
@@ -265,7 +265,7 @@
 		 * Or maybe someone has already called notifyon/notifyoff.
 		 * Leave it alone.
 		 */
-		if(handler(sig->sig) != SIG_DFL)
+		if((handler(sig->sig) != SIG_DFL) && handler(sig->sig) != SIG_IGN)
 			continue;
 		notifyseton(sig->sig, !(sig->flags&NoNotify));
 	}

Reply via email to