Lines Matching defs:lockfile
154 int lock_is_real(const char *lockfile)
161 lfp = open(lockfile, O_RDONLY);
165 lockfile, errno, strerror(errno));
173 lockfile, errno, strerror(errno));
182 syslog(LOG_ERR, "bad pid in lock file %s", lockfile);
200 * lockfile - name of a file to be created
204 int lock_pid_file(const char *lockfile)
214 if (lockfile && lockfile[0]) {
216 lfp = open(lockfile, O_RDWR | O_CREAT | O_EXCL, 0644);
219 if (lock_is_real(lockfile)) {
224 unlink(lockfile);
231 lockfile, errno, strerror(errno));
239 lfp = open(lockfile, O_RDWR | O_CREAT, 0644);
243 lockfile, errno, strerror(errno));
255 lockfile, error, strerror(error));
257 unlink(lockfile);
265 lockfile, errno, strerror(errno));
267 unlink(lockfile);
285 lockfile, error, strerror(error));
287 unlink(lockfile);