yet more
This commit is contained in:
parent
ca4f216272
commit
f5240c937c
12
top.c
12
top.c
@ -1498,6 +1498,10 @@ static const char *rc_write_whatever (void) {
|
|||||||
|
|
||||||
/*###### Startup routines ##############################################*/
|
/*###### Startup routines ##############################################*/
|
||||||
|
|
||||||
|
#ifdef PRETEND4CPUS
|
||||||
|
#define smp_num_cpus 4
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No mater what *they* say, we handle the really really BIG and
|
* No mater what *they* say, we handle the really really BIG and
|
||||||
* IMPORTANT stuff upon which all those lessor functions depend! */
|
* IMPORTANT stuff upon which all those lessor functions depend! */
|
||||||
@ -1510,11 +1514,7 @@ static void before (char *me)
|
|||||||
if (Myname) ++Myname; else Myname = me;
|
if (Myname) ++Myname; else Myname = me;
|
||||||
|
|
||||||
/* establish cpu particulars -- even bigger! */
|
/* establish cpu particulars -- even bigger! */
|
||||||
#ifdef PRETEND4CPUS
|
|
||||||
Cpu_tot = 4;
|
|
||||||
#else
|
|
||||||
Cpu_tot = smp_num_cpus;
|
Cpu_tot = smp_num_cpus;
|
||||||
#endif
|
|
||||||
Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot);
|
Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot);
|
||||||
for (i = 0; i < Cpu_tot; i++)
|
for (i = 0; i < Cpu_tot; i++)
|
||||||
Cpu_map[i] = i;
|
Cpu_map[i] = i;
|
||||||
@ -1591,8 +1591,8 @@ static void configs_read (void)
|
|||||||
for (i = 0; i < GROUPSMAX; i++) Winstk[i]->rc = rcf.win[i];
|
for (i = 0; i < GROUPSMAX; i++) Winstk[i]->rc = rcf.win[i];
|
||||||
|
|
||||||
// lastly, establish the true runtime secure mode and delay time
|
// lastly, establish the true runtime secure mode and delay time
|
||||||
Secure_mode = getuid() ? Secure_mode : 0;
|
if (!getuid()) Secure_mode = 0;
|
||||||
if (!Secure_mode || !getuid()) Rc.delay_time = delay;
|
if (!Secure_mode) Rc.delay_time = delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user