Re: a nohup-like interface to cpu affinity

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


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/



This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:25 EST