Building a Shell
9 points by eatonphil
9 points by eatonphil
I wrote my own little shell too last fall, if you'd like to take the next steps and do things like signal group management, background jobs, and more, I can suggest you check out.... oh dear, it isn't in my browser history anymore, but I think it was:
https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_node/libc_569.html
and
https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_node/libc_561.html#SEC572
look right. Took me ages to find this info when doing it, i should have bookmarked! and also man setpgid and man tcsetpgrp. The signal stuff can get wild, like tracking that and handling them correctly is such a pain, but it makes it all feel more complete lol.
My code if you interested https://github.com/adamdruppe/arsd/blob/master/shell.d that's D code but it calls the same C functions for the OS parts anyway.