Home
last modified time | relevance | path

Searched refs:pidfile (Results 1 – 25 of 118) sorted by relevance

12345

/NextBSD/contrib/unbound/daemon/
HDunbound.c366 writepid (const char* pidfile, pid_t pid) in writepid() argument
370 if ((f = fopen(pidfile, "w")) == NULL ) { in writepid()
372 pidfile, strerror(errno)); in writepid()
377 pidfile, strerror(errno)); in writepid()
389 checkoldpid(char* pidfile, int inchroot) in checkoldpid() argument
392 if((old = readpid(pidfile)) != -1) { in checkoldpid()
485 if(cfg->pidfile && cfg->pidfile[0]) { in perform_setup()
487 if(cfg->pidfile[0] == '/') in perform_setup()
488 daemon->pidfile = strdup(cfg->pidfile); in perform_setup()
489 else daemon->pidfile = fname_after_chroot(cfg->pidfile, in perform_setup()
[all …]
/NextBSD/bin/pkill/tests/
HDpgrep-LF_test.sh9 pidfile=$(pwd)/pidfile.txt
12 daemon -p $pidfile $sleep 5
14 chpid=`cat $pidfile`
15 pid=`pgrep -f -L -F $pidfile $sleep`
27 echo $chpid > $pidfile
28 pgrep -f -L -F $pidfile $sleep 2>/dev/null
40 rm -f $pidfile
HDpkill-LF_test.sh9 pidfile=$(pwd)/pidfile.txt
12 daemon -p $pidfile $sleep 5
14 pkill -f -L -F $pidfile $sleep
29 echo $chpid > $pidfile
30 pkill -f -L -F $pidfile $sleep 2>/dev/null
42 rm -f $pidfile
HDpkill-F_test.sh9 pidfile=$(pwd)/pidfile.txt
14 echo $! > $pidfile
15 pkill -f -F $pidfile $sleep
26 rm -f $pidfile
HDpgrep-F_test.sh9 pidfile=$(pwd)/pidfile.txt
15 echo $chpid > $pidfile
16 pid=`pgrep -f -F $pidfile $sleep`
23 rm -f $pidfile
/NextBSD/contrib/netbsd-tests/lib/libutil/
HDt_pidfile.c149 if (pidfile(NULL) == -1) in helper_default_path()
176 if (pidfile("custom-basename") == -1) in helper_custom_basename()
203 if (pidfile(path) == -1) in helper_custom_path()
228 if (pidfile(NULL) == -1) in helper_change_basenames()
232 if (pidfile(NULL) == -1) in helper_change_basenames()
238 if (pidfile("custom-basename") == -1) in helper_change_basenames()
243 if (pidfile("custom-basename") == -1) in helper_change_basenames()
279 if (pidfile("./var/run/first.pid") == -1) in helper_change_paths()
284 if (pidfile("./second.pid") == -1) in helper_change_paths()
314 if (pidfile(NULL) == -1) in helper_mix()
[all …]
/NextBSD/etc/rc.d/
HDpflog15 pidfile="/var/run/pflogd.pid"
42 pidfile=$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||')
45 rc_flags="-p $pidfile -f $pflog_logfile -i $pflog_dev $rc_flags"
59 rm $pidfile
90 pidfile="/var/run/pflogd.$2.pid"
HDhostapd19 pidfile="/var/run/${name}.pid"
23 pidfile="/var/run/${name}-${ifn}.pid"
26 command_args="-P ${pidfile} -B ${conf_file}"
HDmoused17 pidfile="${pidprefix}.pid"
27 pidfile="${pidprefix}.$2.pid"
28 pidarg="-I $pidfile"
HDbsnmpd17 pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}"
18 command_args="-p ${pidfile}"
HDbthidd16 pidfile="/var/run/${name}.pid"
30 command_args="-c ${config} -H ${hids} -p ${pidfile}"
HDdevd23 pidfile="$_pidfile_from_conf"
25 pidfile="/var/run/${name}.pid"
HDwpa_supplicant41 pidfile="/var/run/${name}/${ifn}.pid"
42 command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile"
HDftp-proxy38 # Write the pidfile depending on $pidfile status.
42 rm $pidfile
/NextBSD/usr.sbin/ipfwpcap/
HDipfwpcap.c67 static char pidfile[MAXPATHLEN]; variable
75 (void) unlink(pidfile); in quit()
89 if (pidfile[0] == '\0') { in okay()
93 snprintf(pidfile, sizeof pidfile, in okay()
97 fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644); in okay()
99 perror(pidfile); in okay()
111 perror(pidfile); in okay()
186 strcpy(pidfile, optarg); in main()
/NextBSD/usr.sbin/daemon/
HDdaemon.c59 const char *pidfile, *ppidfile, *user; in main() local
64 ppidfile = pidfile = user = NULL; in main()
74 pidfile = optarg; in main()
100 if (pidfile != NULL) { in main()
101 pfh = pidfile_open(pidfile, 0600, &otherpid); in main()
107 err(2, "pidfile ``%s''", pidfile); in main()
142 if (pidfile != NULL || ppidfile != NULL || restart) { in main()
/NextBSD/lib/libutil/
HDMakefile17 pidfile.c property.c pty.c pw_util.c quotafile.c realhostname.c \
33 login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \
54 MLINKS+=pidfile.3 pidfile_close.3 \
55 pidfile.3 pidfile_fileno.3 \
56 pidfile.3 pidfile_open.3 \
57 pidfile.3 pidfile_remove.3 \
58 pidfile.3 pidfile_write.3
/NextBSD/bin/pkill/
HDpkill.c133 char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile; in main() local
180 pidfile = NULL; in main()
192 pidfile = optarg; in main()
299 if (pidfile != NULL) in main()
300 pidfromfile = takepid(pidfile, pidfilelock); in main()
800 takepid(const char *pidfile, int pidfilelock) in takepid() argument
806 fh = fopen(pidfile, "r"); in takepid()
808 err(STATUS_ERROR, "Cannot open pidfile `%s'", pidfile); in takepid()
817 errx(STATUS_ERROR, "File '%s' can be locked", pidfile); in takepid()
821 "Error while locking file '%s'", pidfile); in takepid()
[all …]
/NextBSD/sbin/iscontrol/
HDiscontrol.c138 char *pname, *pidfile, *p, *q, *ta, *kw, *v; in main() local
152 pidfile = NULL; in main()
193 pidfile = optarg; in main()
255 op->pidfile = pidfile; in main()
/NextBSD/usr.sbin/unbound/local-setup/
HDlocal-unbound-setup.sh43 pidfile=""
69 : ${pidfile:=/var/run/local_unbound.pid}
180 echo "unbound_pid=\"${pidfile}\""
260 echo " pidfile: ${pidfile}"
354 pidfile="$OPTARG"
/NextBSD/usr.sbin/route6d/misc/
HDchkrt6 $pidfile="/var/run/route6d.pid";
10 open(FD, "< $pidfile") || die "Can not open $pidfile";
/NextBSD/usr.sbin/bluetooth/btpand/
HDtap.c58 char pidfile[PATH_MAX]; in tap_init() local
119 snprintf(pidfile, sizeof(pidfile), "%s/%s.pid", in tap_init()
121 chan->pfh = pidfile_open(pidfile, 0600, NULL); in tap_init()
/NextBSD/contrib/pf/authpf/
HDauthpf.c71 char pidfile[MAXPATHLEN]; /* we save pid in this file. */ variable
204 n = snprintf(pidfile, sizeof(pidfile), "%s/%s", in main()
206 if (n < 0 || (u_int)n >= sizeof(pidfile)) { in main()
238 if ((pidfd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1 || in main()
242 syslog(LOG_ERR, "cannot open or create %s: %s", pidfile, in main()
258 pidfile, otherpid, strerror(save_errno)); in main()
951 if (pidfile[0] && pidfd != -1) in do_death()
952 if (unlink(pidfile) == -1) in do_death()
953 syslog(LOG_ERR, "cannot unlink %s (%m)", pidfile); in do_death()
/NextBSD/libexec/pppoed/
HDpppoed.c506 const char *pidfile; in main() local
510 pidfile = NULL; in main()
524 pidfile = optarg; in main()
619 if (pidfile != NULL) { in main()
622 if ((fp = fopen(pidfile, "w")) == NULL) { in main()
623 perror(pidfile); in main()
677 if (pidfile) in main()
678 remove(pidfile); in main()
/NextBSD/contrib/openbsm/bin/auditd/
HDauditd.c418 FILE * pidfile; in register_daemon() local
444 if ((pidfile = fopen(AUDITD_PIDFILE, "a")) == NULL) { in register_daemon()
451 fd = fileno(pidfile); in register_daemon()
461 if (fprintf(pidfile, "%u\n", pid) < 0) { in register_daemon()
466 fflush(pidfile); in register_daemon()

12345