Sorry, need v2, forgot that task commands may have spaces nowadays. Current version successfully tested with various commands: # taskset -p 3fff 3 pid 3's current affinity mask: ffff warning: affinity cannot be set due to PF_NO_SETAFFINITY flag set taskset: failed to set pid 3's affinity: Invalid argument # Command "PCIe PME" # taskset -p 3fff 191 pid 191's current affinity mask: 8 pid 191's new affinity mask: 3fff Signed-off-by: Carsten Emde <C.Emde@xxxxxxxxx>