From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,f2b75e1128a07545 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fee84,f2b75e1128a07545 X-Google-Attributes: gidfee84,public From: petert@persied.zk3.dec.com (Peter Thompson) Subject: Re: dbx weirdness with fork(2) Date: 1995/11/21 Message-ID: <48tdrv$g3@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 119941999 distribution: world references: <48hvig$ea@solaris.cc.vt.edu> <48rti4$kcb@tiptoe.fhda.edu> organization: CTG newsgroups: comp.unix.osf.osf1,comp.unix.questions I've taken this offline with Roger. We haven't really determined why dbx hangs in the fork just yet. The SIGTRAP he saw was just an artifact of stepping through the system call code, at least that seems the most likely explanation. Just to give an inside view of what dbx does for forks (and this may yet change as things mature) it first sets up a stop on syscall for fork and vfork. This allows dbx to recognize the fork call in the first place. Dbx at this point looks at a few things to decide whether or not it really wants to break on this fork (system calls that fork are not really wanted.) If it is a reasonable fork call, we set up a trap on the syscall exit and let fork do what it is supposed to do. When it finishes, dbx attaches to the process, tells it to stop, advances it past the fork call, and then announces that there is a new child. It seems that this process is breaking down somewhere in fork itself, or possibly in attaching and stopping the child process, which is more likely what is happening in my guess. So far I don't have quite enough to pin this down, but I'm looking into it. PeterT