ptrace in unix tracing non-child processes

Brent Callaghan brent%terra at Sun.COM
Tue Apr 12 16:29:53 AEST 1988


SunOs ptrace() has this facility.  You can give it a pid with
the PTRACE_ATTACH request and attach to another process.  The other
process must be one of "yours" i.e. same uid/gid.  The process gets
a SIGSTOP.  A PTRACE_DETACH is used to send the traced process on
it's way when you've lost interest.

This facility is used by dbx.  You can give it a pid in place of
a core file name e.g. "dbx fnurg 1022".


Made in New Zealand -->  Brent Callaghan  @ Sun Microsystems
			 uucp: sun!bcallaghan
			 phone: (415) 691 6188



More information about the Comp.unix.wizards mailing list