aboutsummaryrefslogtreecommitdiffstats
path: root/src/coopgammad.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-12 10:51:08 +0200
committerMattias Andrée <maandree@kth.se>2016-07-12 10:51:08 +0200
commit9844a38c811d8c6c95eeac15efcb262ea88b2484 (patch)
tree3d7157c6b7db27900d190736d5904f7587a7028c /src/coopgammad.c
parentImplement re-exec (diff)
downloadcoopgammad-9844a38c811d8c6c95eeac15efcb262ea88b2484.tar.gz
coopgammad-9844a38c811d8c6c95eeac15efcb262ea88b2484.tar.bz2
coopgammad-9844a38c811d8c6c95eeac15efcb262ea88b2484.tar.xz
Rename project: gammad => coopgammad
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/coopgammad.c (renamed from src/gammad.c)12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gammad.c b/src/coopgammad.c
index fa24d82..26a9d05 100644
--- a/src/gammad.c
+++ b/src/coopgammad.c
@@ -1,5 +1,5 @@
/**
- * gammad -- Cooperative gamma server
+ * coopgammad -- Cooperative gamma server
* Copyright (C) 2016 Mattias Andrée (maandree@kth.se)
*
* This library is free software: you can redistribute it and/or modify
@@ -207,11 +207,11 @@ static char* get_pathname(const char* suffix)
if ((pw = getpwuid(getuid())))
username = pw->pw_name ? pw->pw_name : "";
- n = sizeof("/.gammad/~/.") + 3 * sizeof(int);
+ n = sizeof("/.coopgammad/~/.") + 3 * sizeof(int);
n += strlen(rundir) + strlen(username) + strlen(name) + strlen(suffix);
if (!(rc = malloc(n)))
goto fail;
- sprintf(rc, "%s/.gammad/~%s/%i%s%s%s",
+ sprintf(rc, "%s/.coopgammad/~%s/%i%s%s%s",
rundir, username, site.method, name ? "." : "", name ? name : "", suffix);
return rc;
@@ -325,7 +325,7 @@ static char* get_crtc_name(libgamma_crtc_information_t* info, libgamma_crtc_stat
*
* @param pidfile The PID file
* @param token An environment variable (including both key and value)
- * that must exist in the process if it is a gammad process
+ * that must exist in the process if it is a coopgammad process
* @return -1: An error occurred
* 0: The service is already running
* 1: The PID file is outdated
@@ -431,10 +431,10 @@ static int create_pidfile(char* pidfile)
char* token;
/* Create token used to validate the service. */
- token = malloc(sizeof("GAMMAD_PIDFILE_TOKEN=") + strlen(pidfile));
+ token = malloc(sizeof("COOPGAMMAD_PIDFILE_TOKEN=") + strlen(pidfile));
if (token == NULL)
return -1;
- sprintf(token, "GAMMAD_PIDFILE_TOKEN=%s", pidfile);
+ sprintf(token, "COOPGAMMAD_PIDFILE_TOKEN=%s", pidfile);
if (putenv(token))
return -1;