I'm writing a basic shell to give out as a class assignment, it works fine on linux but I'm having issues with recapturing control of the terminal when a child process exits on OSX.
I tried making a call to tcsetpgrp(STDERR_FILENO,getpgrp()); but it is interrupted by both SIGTTIN and SIGTTOU. If I ignore the signals, the terminal becomes inaccessible to reading or writing.
Thanks.