How to renice by process name? I am trying to Launch a process using NICE but this process is starting other process by itself and they are not affected by the priority of the main process ( main process has the correct nice but sub process priority is set to default)

So I am trying to renice those process while they run.
I tried

 renice n -p $(pidof &lt;process name&gt;)


but it is not recognised by MacOS (it is probably linux specific ?)
so how can I do that? 

you can find a related discussion here:
https://stackoverflow.com/questions/30062340/starting-process-with-nice-command-macos-leaves-the-process-priority-at-0#comment48287323_30062340

thanks.
You can use pgrep instead of pidof on OS X. Using your example from earlier, the following should work:

renice n -p $(pgrep &lt;process name&gt;)


That said, a child started after the parent has had their priority changed should inherit the parent's priority.