From d63cf334575a2e038a0edaa3f9441cdad094d8d9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 21 Apr 2014 02:44:45 +0200 Subject: unlink pid file on exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2