--- /dev/null
+#ifndef PIDFILE_H_INCLUDED
+#define PIDFILE_H_INCLUDED
+
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+struct pidfh {
+ int pf_fd;
+ char pf_path[MAXPATHLEN + 1];
+ dev_t pf_dev;
+ ino_t pf_ino;
+};
+
+struct pidfh* pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
+int pidfile_write(struct pidfh *pfh);
+int pidfile_close(struct pidfh *pfh);
+int pidfile_remove(struct pidfh *pfh);
+
+#endif