From owner-freebsd-current@FreeBSD.ORG Sat Jun 30 18:45:01 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D351216A41F for ; Sat, 30 Jun 2007 18:45:01 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id A77AC13C45A for ; Sat, 30 Jun 2007 18:45:01 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (fr7er6zn3nspj7g9@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l5UIivST089774; Sat, 30 Jun 2007 11:44:57 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l5UIiu1c089773; Sat, 30 Jun 2007 11:44:56 -0700 (PDT) (envelope-from jmg) Date: Sat, 30 Jun 2007 11:44:56 -0700 From: John-Mark Gurney To: Michiel Boland Message-ID: <20070630184456.GK1221@funkthat.com> Mail-Followup-To: Michiel Boland , freebsd-current@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-current@freebsd.org Subject: Re: sigsuspend gets interrupted by ptrace X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2007 18:45:01 -0000 Michiel Boland wrote this message on Sat, Jun 30, 2007 at 16:30 +0200: > Consider this simple program: > > #include > > 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."