From: Rob Pike Date: Sun, 22 Jun 2008 00:28:37 +0000 (-0700) Subject: more nearly correct interface code for signals on linux X-Git-Tag: weekly.2009-11-06~3644 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=12c2864e4f02d9d5ab452eb70e296fa6c715443b;p=gostls13.git more nearly correct interface code for signals on linux SVN=124021 --- diff --git a/src/runtime/rt1_amd64_linux.c b/src/runtime/rt1_amd64_linux.c index de6ac7f044..6c8b051dd8 100644 --- a/src/runtime/rt1_amd64_linux.c +++ b/src/runtime/rt1_amd64_linux.c @@ -29,8 +29,9 @@ typedef struct sigaction { void (*sa_handler)(int32); void (*sa_sigaction)(int32, siginfo *, void *); } u; /* signal handler */ + uint8 sa_mask[128]; /* signal mask to apply. 128? are they MORONS? */ int32 sa_flags; /* see signal options below */ - uint8 sa_mask[2]; /* signal mask to apply. BUG: 2 is a guess */ + void (*sa_restorer) (void); /* unused here; needed to return from trap? */ } sigaction; void @@ -62,12 +63,10 @@ initsig(void) { int32 i; a.u.sa_sigaction = (void*)sigtramp; - a.sa_flags = 1|2|4|0x10000000|0x20000000|0x40000000|0x80000000; - //a.sa_flags |= SA_SIGINFO; - a.sa_flags = ~0; /* BUG: why is this needed? */ + a.sa_flags |= 0x04; /* SA_SIGINFO */ for(i=0; i