From owner-freebsd-questions Thu Dec 10 23:09:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA26429 for freebsd-questions-outgoing; Thu, 10 Dec 1998 23:09:08 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from none.best.com (chi-qbu-nvm-vty91.as.wcom.net [209.154.111.91]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA26423 for ; Thu, 10 Dec 1998 23:09:04 -0800 (PST) (envelope-from boyan@ixc.net) Received: from localhost (boyan@localhost) by none.best.com (8.8.7/8.8.7) with SMTP id CAA30840 for ; Fri, 11 Dec 1998 02:44:26 -0500 X-Authentication-Warning: none.best.com: boyan owned process doing -bs Date: Fri, 11 Dec 1998 02:44:23 -0500 (EST) From: Boyan Gadjev X-Sender: boyan@none Reply-To: Boyan Gadjev To: freebsd-questions@FreeBSD.ORG Subject: ptrace problem Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I have the following program that attaches and detaches to/from a process and it works on other unixes but on FreeBSD it just kills the process right after attaching to it. I tried it on 3 differend boxes and the result is the same. Is there something specific about FreeBSD ? gdb doesn't fail so i guess I'm misssing something even though it is a 10 lines program. Please reply to boyan@ixc.net because I'm not on the list. Thanks ------------------------------------------------------------------------- #include #include #include int result; pid_t pid; caddr_t addr; void main() { pid = 29282; addr = 0; result = ptrace(PT_ATTACH, pid, addr, 0); result = ptrace(PT_DETACH, pid, addr, 0); } best wishes: Boyan e-mail: boyan@ixc.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message