X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=daemon.git;a=blobdiff_plain;f=pidfile.h;fp=pidfile.h;h=3e5a5a08c0cb9a1f926562a1710a1406ea945ae4;hp=0000000000000000000000000000000000000000;hb=7162d53967117a8eda4257244327d63f95633783;hpb=0aa9138f10ceb0258291ce0945e207393c2fe4cc diff --git a/pidfile.h b/pidfile.h new file mode 100644 index 0000000..3e5a5a0 --- /dev/null +++ b/pidfile.h @@ -0,0 +1,20 @@ +#ifndef PIDFILE_H_INCLUDED +#define PIDFILE_H_INCLUDED + +#include +#include +#include + +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