sigsuspend gets interrupted by ptrace
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Sat Jun 30 18:45:01 UTC 2007
Michiel Boland wrote this message on Sat, Jun 30, 2007 at 16:30 +0200:
> Consider this simple program:
>
> #include <unistd.h>
>
> int main(void)
> {
> pause();
> return 0;
> }
>
> $ ./a.out &
> $ truss -p `pgrep a.out`
> process exit, rval = 0
> [1] Done ./a.out
> $
>
> Surely this must be wrong. The program should have just continued running
> after truss was attached to it.
>
> (PR Filed under kern/114155)
This is probably related to a problem where if you kill yourself w/
SIGSTOP so you can attach to it w/ gdb, you have to put a second
SIGSTOP so that execution will stop after gdb attaches,
otherwise like your example, execution continues past where you wanted..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-current
mailing list