# HG changeset patch # User Roy Marples # Date 1589991252 -3600 # Node ID 0d5671483751cf57730763d0ea8873c92ea3fc8a # Parent 0dd9b7f7cf6b7e7fd7adb936afcbe3c45985628e OpenBSD: Avoid a pledge segfault when exiting No cpath permission anymore, so we can't unlink the pidfile. If compiled for pledge then don't bother. diff -r 0dd9b7f7cf6b -r 0d5671483751 compat/pidfile.c --- a/compat/pidfile.c Wed May 20 15:44:19 2020 +0000 +++ b/compat/pidfile.c Wed May 20 17:14:12 2020 +0100 @@ -86,7 +86,9 @@ else if (ftruncate(pidfile_fd, 0) == -1) error = errno; else { - (void) unlink(pidfile_path); +#ifndef HAVE_PLEDGE /* Avoid a pledge violating segfault. */ + (void)unlink(pidfile_path); +#endif error = 0; }