fixed crash in new rsyscall (failure to set sa_flags for signal handler)
This commit is contained in:
parent
c2cd25bff8
commit
6682ed1e74
1 changed files with 2 additions and 0 deletions
|
|
@ -61,12 +61,14 @@ int __rsyscall(int nr, long a, long b, long c, long d, long e, long f)
|
||||||
|
|
||||||
if (!rs.init) {
|
if (!rs.init) {
|
||||||
struct sigaction sa = {
|
struct sigaction sa = {
|
||||||
|
.sa_flags = SA_SIGINFO | SA_RESTART,
|
||||||
.sa_sigaction = rsyscall_handler,
|
.sa_sigaction = rsyscall_handler,
|
||||||
.sa_mask = set
|
.sa_mask = set
|
||||||
};
|
};
|
||||||
sigfillset(&sa.sa_mask);
|
sigfillset(&sa.sa_mask);
|
||||||
sa.sa_sigaction = rsyscall_handler;
|
sa.sa_sigaction = rsyscall_handler;
|
||||||
__libc_sigaction(SIGSYSCALL, &sa, 0);
|
__libc_sigaction(SIGSYSCALL, &sa, 0);
|
||||||
|
rs.init = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rs.nr = nr;
|
rs.nr = nr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue