[Toybox] new toy: taskset
Rob Landley
rob at landley.net
Tue Jul 17 19:26:46 PDT 2012
On 07/15/2012 06:34 AM, Elie De Brauwer wrote:
> Hello all,
>
> In attach you can find an initial version of 'taskset'. It allows
> setting the cpu affinity of a given PID (or all tasks related with a
> given PID/TID). cpu affinity should be entered in hex, when no affinity
> is given the affinity for the process or the group of tasks is displayed.
Where did the -a flag come from? The taskset on my system matches this
man page:
http://linux.die.net/man/1/taskset
In which taskset is a filter like nice, and -p says work on an existing
pid instead of launching a new one. I'd guess -a is the behavior it
always has, since "tasks" basically means "threads". (Unless containers
use that too...)
By the way: "taskset -p [mask] pid" is _crazy_. pid should be an
argument to -p, ala "taskset mask [-p pid | arg...].
I'm not sure whether to consider the man page's command line
grandfathered in (otherwise "taskset -p mask pid" won't work) or just go
ahead and make the pid an argument to -p. I _can_ implement either but
the current behavior makes no sense and there's no standard and your
submission didn't even match what was there so it's not like that's
_less_ compatible...
Confused,
Rob
--
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation. Pick one.
1342578406.0
More information about the Toybox
mailing list