From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Tue, 26 Apr 2011 11:02:11 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.39-rc3-22+; KDE/4.5.5; x86_64; ; ) References: <2afb8aa9b8f443793d7bf20463b78c1c@ladd.quanstro.net> <84c61fe2a739f0786622f2e27e7a1b82@ladd.quanstro.net> In-Reply-To: <84c61fe2a739f0786622f2e27e7a1b82@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201104261102.12028.dexen.devries@gmail.com> Subject: Re: [9fans] Different results for the same rc script when using listen1 Topicbox-Message-UUID: d5d656aa-ead6-11e9-9d60-3106f5b1d025 Hi, On Monday 25 of April 2011 05:36:17 erik quanstrom wrote: > ; hg diff rfork.c >=20 > > hmm. is that right? it's wait3/wait4 that's failing. it shouldn't > > be necesary to catch SIGCHLD for wait to work. but maybe > > it is >=20 > i take it back. i'd forgotten how quirky unix is these days. > here's the solution. not rc's fault. recompile lib9 and listen1: >=20 > diff -r 5caa04977471 src/lib9/rfork.c > (...) back in 13/05/2009 00:57 i've submitted a different patch for that (mail with subject ``[p9p] Bug in signal handling''). it seems simplier; an= y=20 chances it gets the job done an easier way? here again, with whitespace cleanup: diff -r bde374c81d7e src/lib9/notify.c =2D-- a/src/lib9/notify.c Tue Jan 25 12:13:44 2011 +0100 +++ b/src/lib9/notify.c Tue Apr 26 11:01:25 2011 +0200 @@ -265,7 +265,8 @@ * Or maybe someone has already called notifyon/notifyoff. * Leave it alone. */ =2D if(handler(sig->sig) !=3D SIG_DFL) + if((handler(sig->sig) !=3D SIG_DFL) + && handler(sig->sig) !=3D SIG_IGN) continue; notifyseton(sig->sig, !(sig->flags&NoNotify)); } =2D-=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] ``In other news, STFU and hack.'' mahmud, in response to Erann Gat's ``How I lost my faith in Lisp'' http://news.ycombinator.com/item?id=3D2308816