How to bring a child process running in the background to the foreground
问题 If I used fork() and execv() to spawn several child processes running in the background and I wanted to bring one of them to the foreground, how could I do that? I am trying to write a shell that can start processes either in the foreground or background. 回答1: "Background" and "foreground" are not terms used generically for processes, but rather only apply to shells which can wait for jobs on demand. 回答2: Complimentarily to Ignacio Vazquez-Abram's answer, I suggest that you emulate the shell