Bug 171192 - [libutil] [request] pidfile_read should be made a public interface
Summary: [libutil] [request] pidfile_read should be made a public interface
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: David Bright
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-30 22:00 UTC by David Bright
Modified: 2017-03-31 20:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Bright freebsd_committer freebsd_triage 2012-08-30 22:00:18 UTC
The libutil pidfile(3) routines are useful, but provide only an interface for creating pid files. For software that wants to read and extract a pid from a pid file, there is no public interface. However, the private (static) function pidfile_read() in pidfile.c would provide such an interface. It need only be made externally visible and documented.

Fix: 

Remove "static" from definition in pidfile.c.
Add pidfile_read() prototype to libutil.h.
Add pidfile_read() doc to pidfile.3.
Comment 1 David Bright freebsd_committer freebsd_triage 2017-03-31 20:32:29 UTC
Not quite five years since I wrote this and I was finally going to fix it when I re-read what I wrote, why I needed it, and re-examined the API. I realize now that the existing API is sufficient, so I'm going to close this bug.