Pete's Log: shell stuff
Entry #627, (Coding, Hacking, & CS stuff)(posted when I was 22 years old.)
Wow, fixed some more minor bugs in the parser. The new command line stuff I'd added had a few mistakes related to stderr redirection. Oh well, it's fixed now.
Interesting tcsh behaviour (bug?): executing "sleep 5; echo a; sleep 4; echo b; sleep 3" results in a and b being printed after certain delays. However, suspending that job during the sleep 5 and immediately bringing back into the foreground with fg results in the sleep 5 finishing, but none of the other commands executing. So basically the deal is that with any succession of jobs separated by ;, if the foreground job is suspended, the remaining jobs are lost. Odd.
Yet another way in which tcsh made me happy: running "fg | less" with some jobs in the background results in the message "no job control in subshells." Yay! that'll make life easier.
So I'm putting major investigation into ensuring the code I write will not corrupt itself. By nature, there's gonna be a lot of asynchronous stuff going on, so my signal handlers are gonna have to be very well-behaved. Need to ensure I don't have any race conditions, and I need to ensure I don't hose a linked list in a signal handler that is being manipulated by the sequential program execution. Asynchronous stuff is fun. Luckily kernel hacking's gotten me well aquainted with it...