Sending a process to the background and returning control to my shell
问题 I am programming a shell for my CS class and part of the project involves running a process in the background if the '&' character is passed in by the user. If a process is run in the foreground, I simply execvp the process and it remains in control of the terminal since it is in the foreground. However, if it is a background process, I must return control to my main shell after starting the execution of the process. I understand that the system call tcsetpgrp(pid_t) places the process passed