Re: sigsuspend gets interrupted by ptrace

From: John-Mark Gurney <gurney_j_at_resnet.uoregon.edu>
Date: Sat, 30 Jun 2007 11:44:56 -0700
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."
Received on Sat Jun 30 2007 - 16:45:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC