summaryrefslogtreecommitdiff
path: root/include/libutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libutil.h')
-rw-r--r--include/libutil.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libutil.h b/include/libutil.h
index 298bbc3..21a22cd 100644
--- a/include/libutil.h
+++ b/include/libutil.h
@@ -42,12 +42,24 @@
#include <features.h>
#include <sys/types.h>
+/* for pidfile.c */
+struct pidfh {
+ int pf_fd;
+ char *pf_path;
+ dev_t pf_dev;
+ ino_t pf_ino;
+};
__BEGIN_DECLS
int humanize_number(char *buf, size_t len, int64_t bytes,
const char *suffix, int scale, int flags);
int flopen(const char *_path, int _flags, ...);
+
+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);
__END_DECLS
/* humanize_number(3) */