Lines Matching refs:pidfile
103 read_pidfile(const char *pidfile, int *pidfd) in read_pidfile() argument
110 if ((fd = open(pidfile, O_RDONLY)) < 0) in read_pidfile()
114 error ("Unable to access old pidfile at `%s': %m", pidfile); in read_pidfile()
120 error ("Possible corrupt pidfile `%s'", pidfile); in read_pidfile()
147 create_pidfile(const char *pidfile, uid_t uid) in create_pidfile() argument
152 xassert(pidfile != NULL); in create_pidfile()
153 xassert(pidfile[0] == '/'); in create_pidfile()
155 fd = open(pidfile, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, in create_pidfile()
158 error("Unable to open pidfile `%s': %m", pidfile); in create_pidfile()
163 error("Unable to access pidfile at `%s': %m", pidfile); in create_pidfile()
169 error ("Unable to lock pidfile `%s': %m", pidfile); in create_pidfile()
174 error("Unable to write to pidfile `%s': %m", pidfile); in create_pidfile()
189 if (unlink(pidfile) < 0) in create_pidfile()
190 error("Unable to remove pidfile `%s': %m", pidfile); in create_pidfile()