Skip site navigation (1)Skip section navigation (2)
Date:      09 Feb 2002 20:22:23 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Ptrace and SIGTRAP problem
Message-ID:  <xzpu1sqzci8.fsf@flood.ping.uio.no>
In-Reply-To: <Pine.SOL.4.21.0202051400500.14264-100000@onyx>
References:  <Pine.SOL.4.21.0202051400500.14264-100000@onyx>

next in thread | previous in thread | raw e-mail | index | archive | help
Zhihui Zhang <zzhang@cs.binghamton.edu> 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




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