I know if I nice a shell script (ie: before it runs) all processes that start from the shell script will also be niced.
What if I start a shell script and the renice it, do all the child processes become reniced as well?
Looked in the renice man pages and there are no mention of child processes.
Children inherit the current priority of a process when they're created. That means, if you renice the parent and start a child, it will have the modified priority.
Children that are already running when you renice are not affected.
The clue is in the
fork()
man pages (starting a child is afork/exec
operation):