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:
b0d362f
)
Don't barf when adjusting CPU share if there are no processes in context
author
Steve Muir
<smuir@cs.princeton.edu>
Mon, 9 Jan 2006 21:44:32 +0000
(21:44 +0000)
committer
Steve Muir
<smuir@cs.princeton.edu>
Mon, 9 Jan 2006 21:44:32 +0000
(21:44 +0000)
python/vserverimpl.c
patch
|
blob
|
history
diff --git
a/python/vserverimpl.c
b/python/vserverimpl.c
index
00c8980
..
6b1284c
100644
(file)
--- a/
python/vserverimpl.c
+++ b/
python/vserverimpl.c
@@
-151,7
+151,9
@@
vserver_setsched(PyObject *self, PyObject *args)
get_rspec(resources, &rspec))
return NULL;
- if (pl_setsched(ctx, rspec.cpu_share, rspec.cpu_sched_flags))
+ /* ESRCH indicates that there are no processes in the context */
+ if (pl_setsched(ctx, rspec.cpu_share, rspec.cpu_sched_flags) &&
+ errno != ESRCH)
return PyErr_SetFromErrno(PyExc_OSError);
return Py_None;