I am writing my own shell as part of course assignment. So I need to support background jobs. I am maintaining data strutures for job id and background jobs. But I need to also tell the kernel that this is a background process, so that there is only one terminal foreground process. Until now I am handling background jobs at my program level.
What is the function call to register a background process?
If you want a process to not be part of the terminal’s controlling group, the simplest method is to simply give it a different group.