From: Steve Muir Date: Sat, 3 Dec 2005 00:23:08 +0000 (+0000) Subject: Use CPULIMIT of 0 to indicate a suspended slice X-Git-Tag: after-util-vserver-0_30_208-revert~56 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1d8fb99b110cc3ea4b5ae2b152eb58f999d9a78e;p=util-vserver.git Use CPULIMIT of 0 to indicate a suspended slice --- diff --git a/src/vsh.c b/src/vsh.c index 435ea05..5908b20 100644 --- a/src/vsh.c +++ b/src/vsh.c @@ -294,6 +294,14 @@ static int sandbox_processes(xid_t ctx, char *context) {0,0}}; get_limits(context,list); + + /* check whether the slice has been disabled */ + if (!cpu) + { + fprintf(stderr, "*** this slice has been suspended ***\n"); + exit(0); + } + (void) (sandbox_chroot(ctx)); rspec.cpu_share = cpu;