Home | History | Annotate | Download | only in fio

Lines Matching refs:pidfile

1800 static int check_existing_pidfile(const char *pidfile)
1807 if (stat(pidfile, &sb))
1810 f = fopen(pidfile, "r");
1827 static int write_pid(pid_t pid, const char *pidfile)
1831 fpid = fopen(pidfile, "w");
1833 log_err("fio: failed opening pid file %s\n", pidfile);
1843 * If pidfile is specified, background us.
1845 int fio_start_server(char *pidfile)
1855 if (!pidfile)
1858 if (check_existing_pidfile(pidfile)) {
1859 log_err("fio: pidfile %s exists and server appears alive\n",
1860 pidfile);
1861 free(pidfile);
1868 free(pidfile);
1871 ret = write_pid(pid, pidfile);
1872 free(pidfile);
1888 unlink(pidfile);
1889 free(pidfile);