In case of oom killer terminating some process, we'd rather not see
xenstored go. Xenstored has an in-memory database, and when starting the
process again, it would be empty, which is very inconvenient. Xenstored
should already score quite low and have a fairly low memory footprint,
but according to the user report, it happened.
Closes: #961511
Suggested-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
eval "try_xenstored=\$$try_xenstored_var"
if [ -x $try_xenstored ]; then
if start-stop-daemon --start --quiet \
- --pidfile "$XENSTORED_PIDFILE" --exec "$try_xenstored" -- \
+ --pidfile "$XENSTORED_PIDFILE" \
+ --exec /usr/bin/choom -- -n -1000 "$try_xenstored" -- \
$XENSTORED_ARGS --pid-file "$XENSTORED_PIDFILE"; then
started_xenstored=$try_xenstored
break