Re: a nohup-like interface to cpu affinity

Linux maillist account (l-k@mindspring.com)
Tue, 27 Nov 2001 01:50:25 -0500


At 09:26 AM 11/27/01 +0100, Ingo Molnar wrote:
>On Mon, 26 Nov 2001, Linux maillist account wrote:
> > A nohup-like interface to the cpu affinity service would be useful. It
> > could work like the following example:
> >
> > $ cpuselect -c 1,3-5 gcc -c module.c
>
>yep, this can be done via the chaff utility i posted:
> gcc -c module.c & ./chaff $! 0x6

This of course is subject to a race -- the chaff may not execute before the
gcc has spun off a child or two.

>or, it can be done by changing the affinity of the current shell, every
>new child process will inherit it:
>
> ./chaff $$ 0x6; gcc -c module.c

I like this one *much* better, it is functionally equivalant to cpuselect,
if one puts parens
around the whole thing to keep chaff from infecting with a bias subsequent
commands.

It ideal solution might be to add nohup-like capability to the existing
chaff command:

./chaff 0x6 $$ 1234 43213 ... lots of other pids ... (note my
proposed reversal of pid & bias)
./chaff 0x6 -c gcc -c module.c

Joe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/