diff options
author | Roy Marples <roy@marples.name> | 2007-12-19 12:46:08 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-19 12:46:08 +0000 |
commit | cd45e5435762d8c6cd13287df7df16b97755176e (patch) | |
tree | ef0c7fb0a96e103e2a0dd79ee8c0f47f62ae7174 /src/start-stop-daemon.c | |
parent | 2f7218c9849e667ba20d76e4dfe46b4bb195063a (diff) |
Introduce cbasename so we don't have to strdup(basename) and free all the time.
Diffstat (limited to 'src/start-stop-daemon.c')
-rw-r--r-- | src/start-stop-daemon.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c index 82fa99a4..ba93a29e 100644 --- a/src/start-stop-daemon.c +++ b/src/start-stop-daemon.c @@ -33,8 +33,6 @@ * SUCH DAMAGE. */ -#define APPLET "start-stop-daemon" - /* nano seconds */ #define POLL_INTERVAL 20000000 #define WAIT_PIDFILE 500000000 @@ -90,7 +88,7 @@ typedef struct schedulelist } schedulelist_t; static schedulelist_t *schedule; -static char *applet; +static const char *applet; static char *changeuser; static char **newenv; @@ -574,7 +572,7 @@ int start_stop_daemon (int argc, char **argv) char *svcname = getenv ("SVCNAME"); char *env; - applet = argv[0]; + applet = cbasename (argv[0]); atexit (cleanup); signal (SIGINT, handle_signal); |