Lines Matching defs:pidfile
136 char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile;
183 pidfile = NULL;
195 pidfile = optarg;
302 if (pidfile != NULL)
303 pidfromfile = takepid(pidfile, pidfilelock);
593 "usage: %s %s [-F pidfile] [-G gid] [-M core] [-N system]\n"
807 takepid(const char *pidfile, int pidfilelock)
813 fh = fopen(pidfile, "r");
815 err(STATUS_ERROR, "Cannot open pidfile `%s'", pidfile);
819 * If we can lock pidfile, this means that daemon is not
824 errx(STATUS_ERROR, "File '%s' can be locked", pidfile);
828 "Error while locking file '%s'", pidfile);
836 errx(STATUS_ERROR, "Pidfile `%s' is empty", pidfile);
839 err(STATUS_ERROR, "Cannot read from pid file `%s'", pidfile);
845 errx(STATUS_ERROR, "Invalid pid in file `%s'", pidfile);
847 errx(STATUS_ERROR, "Invalid pid in file `%s'", pidfile);