+
+/* Opens and reads a PID from 'pidfile'. Returns the positive PID if
+ * successful, otherwise a negative errno value. */
+pid_t
+read_pidfile(const char *pidfile)
+{
+ return read_pidfile__(pidfile, true);
+}
+
+
+/* Opens and reads a PID from 'pidfile', if it exists. Returns 0 if 'pidfile'
+ * doesn't exist, the positive PID if successful, otherwise a negative errno
+ * value. */
+pid_t
+read_pidfile_if_exists(const char *pidfile)
+{
+ return read_pidfile__(pidfile, false);
+}