If we are using the taskset for setting the particular process to run on a particular core by using the process pid. I want to know that all the child processes which will generated by the pid will also run on the particular core or uses any core.
taskset calls sched_setaffinity(2) (here) to specify the set of CPUs a thread is eligible to run on. As sched_setaffinity(2)'s manual states:
A child created via
fork(2)inherits its parent's CPU affinity mask. The affinity mask is preserved across anexecve(2).
the child processes are allowed to run on the same set of CPUs as their parent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With