mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-28 22:44:59 -04:00
17 lines
473 B
Plaintext
17 lines
473 B
Plaintext
$NetBSD: patch-ad,v 1.3 2013/10/14 06:51:02 adam Exp $
|
|
|
|
--- lib/sighandle.c.orig 2003-10-05 03:49:29.000000000 +0000
|
|
+++ lib/sighandle.c
|
|
@@ -204,8 +204,10 @@ static RETSIGTYPE SIG_handle (int sig)
|
|
this = SIG_handlers[sig];
|
|
while (this != (struct SIG_hlist *) NULL)
|
|
{
|
|
- (*this->handler)(sig);
|
|
+ /* handler may free this (and thus clobber this->next) */
|
|
+ struct SIG_hlist *current = this;
|
|
this = this->next;
|
|
+ (*current->handler)(sig);
|
|
}
|
|
SIG_endCrSect();
|
|
|