aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-21 02:44:45 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-21 02:44:45 +0200
commitd63cf334575a2e038a0edaa3f9441cdad094d8d9 (patch)
tree24173dfa57e853f437df8935b9ad28899dc6359c /src
parentmds-server: parse command line arguments (diff)
downloadmds-d63cf334575a2e038a0edaa3f9441cdad094d8d9.tar.gz
mds-d63cf334575a2e038a0edaa3f9441cdad094d8d9.tar.bz2
mds-d63cf334575a2e038a0edaa3f9441cdad094d8d9.tar.xz
unlink pid file on exit
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mds.c b/src/mds.c
index a263173..e017cb6 100644
--- a/src/mds.c
+++ b/src/mds.c
@@ -230,6 +230,11 @@ int main(int argc_, char** argv_)
close(fd);
unlink(pathname);
+ /* Remove PID file. */
+ snprintf(pathname, sizeof(pathname) / sizeof(char), "%s/%u.pid",
+ MDS_RUNTIME_ROOT_DIRECTORY, display);
+ unlink(pathname);
+
return rc;
}