lkml.org 
[lkml]   [2001]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: a nohup-like interface to cpu affinity
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/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.111 / U:3.096 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site