git://git.onelab.eu
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6598c4
)
Use CPULIMIT of 0 to indicate a suspended slice
author
Steve Muir
<smuir@cs.princeton.edu>
Sat, 3 Dec 2005 00:23:08 +0000
(
00:23
+0000)
committer
Steve Muir
<smuir@cs.princeton.edu>
Sat, 3 Dec 2005 00:23:08 +0000
(
00:23
+0000)
src/vsh.c
patch
|
blob
|
history
diff --git
a/src/vsh.c
b/src/vsh.c
index
435ea05
..
5908b20
100644
(file)
--- 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;