aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-03 20:42:12 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-03 20:42:12 +0200
commit3296ae4d01ab31e651b217650d1441e1e3fdbebd (patch)
tree35c793916ceaa24f2228251fff0de546fa03fe76
parentseparation of server state marshaling into a new method (diff)
downloadmds-3296ae4d01ab31e651b217650d1441e1e3fdbebd.tar.gz
mds-3296ae4d01ab31e651b217650d1441e1e3fdbebd.tar.bz2
mds-3296ae4d01ab31e651b217650d1441e1e3fdbebd.tar.xz
compile-time configurable api-fs path
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/config.h8
-rw-r--r--src/mds-server.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h
index 6d38a14..da3ff81 100644
--- a/src/config.h
+++ b/src/config.h
@@ -118,6 +118,14 @@
/**
+ * The path of the symlink to the executed command
+ */
+#ifndef SELF_EXE
+#define SELF_EXE "/proc/self/exe"
+#endif
+
+
+/**
* The maximum number of command line arguments to allow
*/
#ifndef ARGC_LIMIT
diff --git a/src/mds-server.c b/src/mds-server.c
index eb35daf..d0259f3 100644
--- a/src/mds-server.c
+++ b/src/mds-server.c
@@ -349,7 +349,7 @@ int main(int argc_, char** argv_)
close(pipe_rw[1]);
/* Re-exec the server. */
- readlink_ptr = readlink("/proc/self/exe", readlink_buf, PATH_MAX - 1);
+ readlink_ptr = readlink(SELF_EXE, readlink_buf, PATH_MAX - 1);
if (readlink_ptr < 0)
goto reexec_fail;
/* ‘readlink() does not append a null byte to buf.’ */