From 1d8fb99b110cc3ea4b5ae2b152eb58f999d9a78e Mon Sep 17 00:00:00 2001 From: Steve Muir Date: Sat, 3 Dec 2005 00:23:08 +0000 Subject: [PATCH] Use CPULIMIT of 0 to indicate a suspended slice --- src/vsh.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.43.0