Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2007 11:44:56 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        Michiel Boland <michiel@boland.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: sigsuspend gets interrupted by ptrace
Message-ID:  <20070630184456.GK1221@funkthat.com>
In-Reply-To: <Pine.GSO.4.64.0706301630130.29170@neerbosch.nijmegen.internl.net>
References:  <Pine.GSO.4.64.0706301630130.29170@neerbosch.nijmegen.internl.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070630184456.GK1221>