Lines Matching refs:pidfile
1639 static int check_existing_pidfile(const char *pidfile)
1646 if (stat(pidfile, &sb))
1649 f = fopen(pidfile, "r");
1666 static int write_pid(pid_t pid, const char *pidfile)
1670 fpid = fopen(pidfile, "w");
1672 log_err("fio: failed opening pid file %s\n", pidfile);
1682 * If pidfile is specified, background us.
1684 int fio_start_server(char *pidfile)
1694 if (!pidfile)
1697 if (check_existing_pidfile(pidfile)) {
1698 log_err("fio: pidfile %s exists and server appears alive\n",
1699 pidfile);
1700 free(pidfile);
1707 free(pidfile);
1710 int ret = write_pid(pid, pidfile);
1712 free(pidfile);
1728 unlink(pidfile);
1729 free(pidfile);