From ebbe8d81216b406beeed3255f133cf409b76e8d6 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Fri, 28 Jun 2019 05:33:35 +0000 Subject: [PATCH] atexit() returns -1 on failure --- src/lib/libutil/pidfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libutil/pidfile.c b/src/lib/libutil/pidfile.c index af049d17..0dc47d6e 100644 --- a/src/lib/libutil/pidfile.c +++ b/src/lib/libutil/pidfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pidfile.c,v 1.12 2015/11/27 01:57:59 mmcc Exp $ */ +/* $OpenBSD: pidfile.c,v 1.13 2019/06/28 05:33:35 deraadt Exp $ */ /* $NetBSD: pidfile.c,v 1.4 2001/02/19 22:43:42 cgd Exp $ */ /*- @@ -83,7 +83,7 @@ pidfile(const char *basename) (void) fclose(f); pidfile_pid = pid; - if (atexit(pidfile_cleanup) < 0) { + if (atexit(pidfile_cleanup) == -1) { save_errno = errno; (void) unlink(pidfile_path); free(pidfile_path);