Permalink
Browse files

Fix the rt_sigaction call.

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 cdc7f6423facfa9de2b18dec52aa66395d021836
Showing with 5 additions and 3 deletions.
  1. +5 −3 attach.c
View
@@ -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

0 comments on commit cdc7f64

Please sign in to comment.