What I know:
When a process is running I can press Ctrl+Z and suspend it. The with bg
and fg
commands I can either run it in "background" or "foreground" mode.
What I'm aksing:
Is there a way to suspend a process, send it to run in background or foreground in C?
Edit: I have the process id. I want to send that process to the background for example.