From owner-freebsd-hackers Sat Feb 9 11:22:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 2F4CE37B405 for ; Sat, 9 Feb 2002 11:22:26 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 65BE85341; Sat, 9 Feb 2002 20:22:24 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Zhihui Zhang Cc: freebsd-hackers@freebsd.org Subject: Re: Ptrace and SIGTRAP problem References: From: Dag-Erling Smorgrav Date: 09 Feb 2002 20:22:23 +0100 In-Reply-To: Message-ID: Lines: 13 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Zhihui Zhang writes: > The following small program demonstrates that a parent process can write > into the data space of its child by ptrace(). If the parent waits for the > child to exit, there is no problem. However, if the parent does not do so, > the child will get a SIGTRAP signal and core dumps. Can anyone give me a > clue how this is the case? Thanks! The parent must either detach from the child, or wait for it to terminate. See ptrace(2). DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message