summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-13 06:31:32 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-13 06:33:23 -0400
commitbdeff9288fb2dd281a488052222b857a23546e8f (patch)
treee46bc990d17479ce6d51b87ccc2990470816f22b /gpsd.c
parent027002aff19ea428640d6e8489f4e992d95fc13b (diff)
downloadgpsd-bdeff9288fb2dd281a488052222b857a23546e8f.tar.gz
If command sockets weren't opend, a stale pidfile could linger.
All regression tests pass.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index 3ffdc4c0..9526ead5 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1991,6 +1991,7 @@ int main(int argc, char *argv[])
gpsd_log(&context.errout, LOG_ERR,
"command sockets creation failed, netlib errors %d, %d\n",
msocks[0], msocks[1]);
+ (void)unlink(pid_file);
exit(EXIT_FAILURE);
}
gpsd_log(&context.errout, LOG_INF, "listening on port %s\n", gpsd_service);