[cs631apue] sish -- backgrounding processes

Elliot Wasem ewasem at stevens.edu
Wed Dec 11 10:18:30 EST 2019


Hey Jan,

So I'm confused about how sish is supposed to behave with background processes. Are we simply putting it in the background and allowing it to run to completion, with no chance of returning it to foreground? Are we supposed to be able to handle 'fg' functionality like in bash/sh/zsh/etc.?
Currently it appears that we're supposed to handle the former, essentially forking the child and, if '&' is appended to command, to not wait for a return before prompting for new input, otherwise waiting on the child to return.
How would you suggest handling SIGCHLD in this case? If we background a process and don't setup a SIGCHLD handler, then the exited child will be a zombie, but if we set a sigchld handler of SIG_IGN, will that interfere with wait(2) for other processes?
Thanks,
Elliot Wasem
https://elliotwasem.xyz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20191211/01d7134d/attachment.html>


More information about the cs631apue mailing list