Within modern shells, I am able to leave a process via one of two control sequences:
- Usually Ctrl+C will directly send SIGINT to the majority of shell commands (e.g.
- A few processes capture the terminal and prevent that from working, but Ctrl+Z will still suspend them (e.g.
man, albeit not
screen) and then I can
kill %1to finish them off or
fgif I do want to resume later.
Both of these work from the very terminal running the process. That is, I can use them without needing a second login session in another window/tab.
However, I am in the middle of trying to set up a second serial port in older versions of Unix (e.g. Unix V6 or 2.11BSD) running in an emulator, and keep hitting situations where I run e.g.
echo "test" > /dev/tty00
That command works fine for
/dev/tty00 is apparently still not configured right on my part. And so the command just hangs! At this point, I can't do anything to stop it from trying/waiting. It doesn't seem to ever time out. Is there some more arcane key sequence or other strategy for resolving a Unix process that's stuck like this, when only one terminal is available?
(I noticed this on a real PDP-11 at Living Computer Museum as well, where nothing I knew to type on the ASR-33 terminal seemed to be able to interrupt certain commands after I ran them.)
UPDATE: thanks for all the tips below! I can now note that it is possible to
kill the process by PID if I do have a second terminal open, i.e. it's not in what we would nowadays see as the dreaded uninterruptible sleep state. However so far none of the key combinations below have worked, at least not as entered via the TELCOM program on a Tandy Model 102 (which I understand may complicate things as far as how keypresses get sent and I'll have to test separately).