Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!pasteur!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: re: Odd subprocess behaviour Message-ID: <8802151119.AA27861@ucbvax.Berkeley.EDU> Date: 10 Feb 88 16:00:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 ...[I]f you create a subprocess and attach to it, then re-attach to the parent process, then spawn a second subprocess and attach to it, THEN kill the first subprocess with a STOP command from t'other (still with me?), VMS can't decide which of the remaining two processes (parent and 2nd child) is attached to the terminal! You get a mixture of prompts, and it isn't clear where the things you type go. ... Same thing happens on VMS V4.5. It's actually not hard to see why this is happening, given the mechanisms DCL uses to implement SPAWN and ATTACH (which are too involved to go into here); but it certainly isn't what you'd WANT to have happening. Submit an SPR! In the meantime, the easiest work-around I can think of is: Rather than doing a STOP for subprocess X, ATTACH to it and type LOGOUT. Unfortunately, this will put you back in the process that created X, rather than the one you just ATTACHed from (for exactly the same reason that STOP will make the two processes fight for the terminal), but another ATTACH should get you where you want to be. My second observation is that whenever you leave a child process (logout or attach), that last command line (logout or attach...) is put on the top of the command stack of the parent process if it's running a program, but not at DCL level. Anyone explain why this should be so? To give an example, this happens from TPU. Actually, the last command line is ALWAYS on the "command stack" FOR THE TERMINAL DRIVER. It's just that DCL (and many other programs, like MAIL) maintain their own recall stacks, and hence the command saved by the driver is never visible to you. (The terminal driver only saves one line; DCL and programs save more, typically 20. The easiest way for a program to get multiple command lines saved is to use SMG$READ_COMPOSED_LINE to get its input.) -- Jerry