mwm40@DUTS.ccc.amdahl.com (Marcelo Mourier) (03/29/91)
Hi people, I'm confused with the issue of forking under tracing; e.g., when a process that is being traced does a fork(2). According to POSIX 1003.1-1990 the trace status is NOT in the list of attributes that the child doesn't inherit from its parent. Does this imply that it MUST inherit it? (I'm not very good at reading standards :-) The fork(2) man page in my Sys V Unix states that the trace status is indeed inherited by the child; something that supports the previous statement. However....., in Minix 1.5 the trace flag in the child is cleared during a fork (see [forkexit.c:do_fork()]) Any clues..? The second question is regarding breakpoints. I haven't seen the actual sources of a debbuger, but as I understand it they set breakpoints into the traced process by replacing the first byte of the instruction's op-code with the int3 (debbug trap) op-code. Now, what happens when the traced process does a fork(2)... Do the breakpoints get copied into the child's text segment..? Any ideas..? -- -- Marcelo Mourier Internet: mwm40@duts.ccc.amdahl.com UUCP: ...!duts.ccc.amdahl.com!mwm40