Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 836
node ninja Avatar asked Sep 14 '25 16:09

node ninja


1 Answers

"Background" and "foreground" are not terms used generically for processes, but rather only apply to shells which can wait for jobs on demand.

like image 186
Ignacio Vazquez-Abrams Avatar answered Sep 16 '25 07:09

Ignacio Vazquez-Abrams