guy@rlgvax.UUCP (Guy Harris) (07/27/83)
In V6 UNIX, the T-bit wasn't set when a traced process did an "exec", so there was an "exect" routine (in *some*, but not all, versions of V6) which set the T-bit so that there would be a trace trap after the "exec" system call was completed. In V7 and subsequent UNIXes, a trace trap occurs if a traced process does an "exec". However, in both 4.1BSD and VAX System III there is an "exect" routine (as such, I suspect it came from 32V). Is there a reason why it is needed (both the 4.1BSD and S3 "sdb" use it), or is it just a hangover from an early 32V which didn't give you the trace trap? I got burned by this while porting "sdb" to another machine; we didn't do an "exect" for our MC68000 machine, and "sdb" was changed to use "execve" instead. HOWEVER, "sdb" seems to think that using "exect" causes TWO trace traps (I haven't tried it to see if it does) and COMPENSATES for it by continuing the process after the first trace trap! The fix, by the way, is to move the label "f1:" in "docomm.c" to after the dopcs('c') - replacing "exect" with "execve" and doing this seems to work. Anybody know why "exect" was 1) kept around and 2) used? Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy