diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-11 15:41:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-11 15:41:25 +0000 |
commit | 2cb879091e1e32282a91a87fe3f69c80bb196178 (patch) | |
tree | c8b8f95be491edfed77ddc9345b8433774161799 /usr.sbin | |
parent | 38d4d8f0e7d0629459f8103cac4b6436f532efd1 (diff) |
check before unlinking pidfile
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pppd/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c index 96acea3b2a9..7592bf8a596 100644 --- a/usr.sbin/pppd/main.c +++ b/usr.sbin/pppd/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 1996/04/21 23:41:21 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.7 1996/05/11 15:41:24 deraadt Exp $ */ /* * main.c - Point-to-Point Protocol main module @@ -20,7 +20,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: main.c,v 1.6 1996/04/21 23:41:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.7 1996/05/11 15:41:24 deraadt Exp $"; #endif #include <stdio.h> @@ -505,7 +505,7 @@ main(argc, argv) } if (!demand) { - if (unlink(pidfilename) < 0 && errno != ENOENT) + if (pidfilename[0] != 0 && unlink(pidfilename) < 0 && errno != ENOENT) syslog(LOG_WARNING, "unable to delete pid file: %m"); pidfilename[0] = 0; } |