SSD_NICELEVEL can now affect the nicelevel for daemons started
by start-stop-daemon, #175397.
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
|
||||
#include "librc.h"
|
||||
|
||||
#define ERRX eerrorx("out of memory");
|
||||
#define ERRX eerrorx("out of memory");
|
||||
|
||||
#define PROFILE_ENV "/etc/profile.env"
|
||||
#define SYS_WHITELIST RC_LIBDIR "conf.d/env_whitelist"
|
||||
#define USR_WHITELIST "/etc/conf.d/env_whitelist"
|
||||
#define RC_CONFIG "/etc/conf.d/rc"
|
||||
#define PROFILE_ENV "/etc/profile.env"
|
||||
#define SYS_WHITELIST RC_LIBDIR "conf.d/env_whitelist"
|
||||
#define USR_WHITELIST "/etc/conf.d/env_whitelist"
|
||||
#define RC_CONFIG "/etc/conf.d/rc"
|
||||
|
||||
#define PATH_PREFIX RC_LIBDIR "bin:/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
#define PATH_PREFIX RC_LIBDIR "bin:/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
|
||||
#ifndef S_IXUGO
|
||||
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
|
||||
|
||||
@@ -537,6 +537,10 @@ int main (int argc, char **argv)
|
||||
signal (SIGQUIT, handle_signal);
|
||||
signal (SIGTERM, handle_signal);
|
||||
|
||||
if ((env = getenv ("SSD_NICELEVEL")))
|
||||
if (sscanf (env, "%d", &nicelevel) != 1)
|
||||
eerror ("%s: invalid nice level `%s' (SSD_NICELEVEL)", progname, env);
|
||||
|
||||
while ((c = getopt_long (argc, argv,
|
||||
"KN:R:Sbc:d:g:mn:op:qs:tu:r:vx:1:2:",
|
||||
longopts, (int *) 0)) != -1)
|
||||
|
||||
Reference in New Issue
Block a user