Author: sthibault Date: 2010-09-13 02:36:31 +0000 (Mon, 13 Sep 2010) New Revision: 4421
Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-catch-signal.diff Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/series Log: patches/hurd-i386/submitted-catch-signal.diff: New patch to fix signal-catching functions. Modified: glibc-package/trunk/debian/changelog =================================================================== --- glibc-package/trunk/debian/changelog 2010-09-09 10:19:32 UTC (rev 4420) +++ glibc-package/trunk/debian/changelog 2010-09-13 02:36:31 UTC (rev 4421) @@ -1,9 +1,14 @@ eglibc (2.11.2-6) UNRELEASED; urgency=low + [ Aurelien Jarno ] * Update Arabic debconf translation, by Ossama Khayat. Closes: #596161. - -- Aurelien Jarno <aure...@debian.org> Thu, 09 Sep 2010 11:54:14 +0200 + [ Samuel Thibault ] + * patches/hurd-i386/submitted-catch-signal.diff: New patch to fix + signal-catching functions. + -- Samuel Thibault <sthiba...@debian.org> Mon, 13 Sep 2010 03:52:07 +0200 + eglibc (2.11.2-5) unstable; urgency=low [ Samuel Thibault ] Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-catch-signal.diff =================================================================== --- glibc-package/trunk/debian/patches/hurd-i386/submitted-catch-signal.diff (rev 0) +++ glibc-package/trunk/debian/patches/hurd-i386/submitted-catch-signal.diff 2010-09-13 02:36:31 UTC (rev 4421) @@ -0,0 +1,47 @@ +2010-09-13 Samuel Thibault <samuel.thiba...@ens-lyon.org> + + Fix signal-catching functions. + + We need to restore the signal mask, because else the signal handling + code will have blocked the catched signal and for instance calling + hurd_catch_signal again would then dump core. There was also a trivial + inverted logic. + + * hurd/catch-signal.c (hurd_catch_signal): Use sigsetjmp/siglongjmp + instead of setjmp/longjmp to restore the signal mask. Call sigsetjmp + when handler == SIG_ERR, not when handler != SIG_ERR. + +--- + catch-signal.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) +diff --git a/hurd/catch-signal.c b/hurd/catch-signal.c +index 583f99e..42f490e 100644 +--- a/hurd/catch-signal.c ++++ b/hurd/catch-signal.c +@@ -28,9 +28,9 @@ hurd_catch_signal (sigset_t sigset, + error_t (*operate) (struct hurd_signal_preemptor *), + sighandler_t handler) + { +- jmp_buf buf; ++ sigjmp_buf buf; + void throw (int signo, long int sigcode, struct sigcontext *scp) +- { longjmp (buf, scp->sc_error ?: EGRATUITOUS); } ++ { siglongjmp (buf, scp->sc_error ?: EGRATUITOUS); } + + struct hurd_signal_preemptor preemptor = + { +@@ -41,12 +41,12 @@ hurd_catch_signal (sigset_t sigset, + struct hurd_sigstate *const ss = _hurd_self_sigstate (); + error_t error; + +- if (handler == SIG_ERR) ++ if (handler != SIG_ERR) + /* Not our handler; don't bother saving state. */ + error = 0; + else + /* This returns again with nonzero value when we preempt a signal. */ +- error = setjmp (buf); ++ error = sigsetjmp (buf, 1); + + if (error == 0) + { Modified: glibc-package/trunk/debian/patches/series =================================================================== --- glibc-package/trunk/debian/patches/series 2010-09-09 10:19:32 UTC (rev 4420) +++ glibc-package/trunk/debian/patches/series 2010-09-13 02:36:31 UTC (rev 4421) @@ -132,6 +132,7 @@ hurd-i386/local-i686.diff hurd-i386/local-no-hp-timing.diff hurd-i386/cvs-sched_param.diff +hurd-i386/submitted-catch-signal.diff ia64/local-dlfptr.diff ia64/submitted-sysconf.diff -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1ouyui-0004qi...@alioth.debian.org