Skip to content

Commit

Permalink
Fix the rt_sigaction call.
Browse files Browse the repository at this point in the history
sizeof(sigset_t) is something ludicrous like 0x80 in userspace. Just hard-code
it at 8, since all the userspace definitions seem to be lies.
  • Loading branch information
nelhage committed Jan 18, 2011
1 parent b3eb80f commit cdc7f64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions attach.c
Expand Up @@ -225,9 +225,11 @@ int attach_child(pid_t pid, const char *pty) {
&act, sizeof act);
if (err < 0)
goto out_kill;
ptrace_remote_syscall(&child, __NR_rt_sigaction,
SIGHUP, scratch_page,
0, sizeof(sigset_t), 0, 0);
err = ptrace_remote_syscall(&child, __NR_rt_sigaction,
SIGHUP, scratch_page,
0, 8, 0, 0);
if (err < 0)
goto out_kill;

}
#endif
Expand Down

0 comments on commit cdc7f64

Please sign in to comment.