Lines Matching defs:pid
74 int pid;
81 if (fscanf(file, "%d", &pid) == -1)
82 errx(EXIT_FAILURE, "Failed to read pid from pidfile '%s'",
85 printf("Read pid %d, current pid %d\n", pid, getpid());
86 if (pid != getpid())
88 "current pid (%d)", pid, getpid());
110 pid_t pid;
112 pid = fork();
113 ATF_REQUIRE(pid != -1);
114 if (pid == 0) {
122 ATF_REQUIRE(waitpid(pid, &status, 0) != -1);
134 if (asprintf(&path, "%s%s.pid", _PATH_VARRUN,
216 run_child(helper_custom_path, "./var/run/my-pidfile.pid");
218 ensure_deleted("./var/run/my-pidfile.pid");
279 if (pidfile("./var/run/first.pid") == -1)
281 "'./var/run/first.pid'");
282 check_pidfile("./var/run/first.pid");
284 if (pidfile("./second.pid") == -1)
285 errx(EXIT_FAILURE, "Failed to create pidfile 'second.pid'");
286 ensure_deleted("./var/run/first.pid");
287 check_pidfile("./second.pid");
301 ensure_deleted("./var/run/my-pidfile.pid");
302 ensure_deleted("second.pid");
318 if (pidfile("./second.pid") == -1)
319 errx(EXIT_FAILURE, "Failed to create pidfile 'second.pid'");
321 check_pidfile("./second.pid");
324 errx(EXIT_FAILURE, "Failed to create pidfile 'second.pid'");
326 ensure_deleted("./second.pid");
348 ensure_deleted("second.pid");