]> gitweb @ CieloNegro.org - daemon.git/blob - pidfile.h
Done!
[daemon.git] / pidfile.h
1 #ifndef PIDFILE_H_INCLUDED
2 #define PIDFILE_H_INCLUDED
3
4 #include <sys/param.h>
5 #include <sys/stat.h>
6 #include <sys/types.h>
7
8 struct pidfh {
9     int     pf_fd;
10     char    pf_path[MAXPATHLEN + 1];
11     dev_t   pf_dev;
12     ino_t   pf_ino;
13 };
14
15 struct pidfh* pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
16 int pidfile_write(struct pidfh *pfh);
17 int pidfile_close(struct pidfh *pfh);
18 int pidfile_remove(struct pidfh *pfh);
19
20 #endif