CVS commit: src/lib/libutil

"Roy Marples" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	roy
Date:		Sun May 31 11:31:02 UTC 2026

Modified Files:
	src/lib/libutil: pidfile.c

Log Message:
pidfile: Fix a few issues with error paths.

pidfile_unlock() returns -1 on error rather than EBADF which is now errno.
pidfile_read() now closes the opened fd on error if not pidfile_fd.
pidfile_lock() now closed pidfile_fd if failing to strdup to pidfile_path.

A long standing issue correctly setting FD_CLOEXEC has been resolved in the
case where O_CLOEXEC is not defined.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libutil/pidfile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.