Debugging Child Processes.

R. Kannan kannan at babcock.cerc.wvu.wvnet.edu
Sat Aug 26 01:13:45 AEST 1989


>From article <6840004 at hpcllcm.HP.COM>, by pratap at hpcllcm.HP.COM (Pratap Subrahmanyam):

> main()
> {
> ....
> if((pid = fork()) == 0) {
> 
> /* How can you step into this area ???? */
> 
> }
> }
> 
> Any pointers will be appreciated.
> 
> -- pratap

 Standard dbx(or any of its variations dbxtool etc)
there are commands like attach, debug etc.

What one woulf have to do is to get the pid of the child process and
then attach to it.
The great dbx will then step one through the child process.

We have found this otbe very useful.

If the child process quits too soon, then put a sleep in child and then
see what happens in it.

	Hope this helps.

--kannan



More information about the Comp.unix.wizards mailing list