X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fvsh.c;h=5908b20f8755244ae6e0bf02e32458398ef76f7c;hb=3928ff35846885e08afbe19403ffb6256dcaeef0;hp=435ea05e272fc2f03448beca8a43d712790b0c37;hpb=14603c6b4761d9897f7edf0b19fd5acb5f036c56;p=util-vserver.git 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;