Is it possible to tell whether a process/thread has the PF_NO_SETAFFINITY
flag set? I'm running taskset on a series of process ids and some are throwing errors of the following form:
taskset: failed to set pid 30's affinity: Invalid argument
I believe this is because some processes have PF_NO_SETAFFINITY
set (see Answer).
Thank you!
Yes - look at
/proc/PID/stat
's 'flag' fieldLook here for details on using /proc:
Example:
The flags are
4194624
A: I don't feel comfortable providing this without the opportunity to test, but you can try something like this...