Date: Fri, 11 Dec 1998 02:44:23 -0500 (EST) From: Boyan Gadjev <boyan@ixc.net> To: freebsd-questions@FreeBSD.ORG Subject: ptrace problem Message-ID: <Pine.LNX.3.96.981211023721.30831A-100000@none>
next in thread | raw e-mail | index | archive | help
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 <errno.h>
#include <sys/types.h>
#include <sys/ptrace.h>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.981211023721.30831A-100000>
