Pete's Log: fun with tcsh
Entry #593, (Coding, Hacking, & CS stuff)(posted when I was 22 years old.)
heh. So I'm abusing tcsh in order to figure out how exactly it handles various things (I think out of principle I won't allow myself to look at the source of any other shells until I've finished mine, but I'll definitely be reading the tcsh source when I'm done with this). One thing that concerned me was job control for any sort of pipe that ended with a shell builtin. But turns out that doing stuff of that sorts will mess with tcsh as well. As an example, a command such as "sleep 10 | echo" produces interesting results. The echo will exit immediately, dropping back to a prompt. "jobs" says that "sleep 10" is running, but after 10 seconds, jobs will still say the same thing. So running "fg" will cause sleep to exit with a hangup. Fantastic.