| /freebsd-12.1/contrib/unbound/contrib/ |
| H A D | validation-reporter.sh | 12 pidfile="/var/run/validation-reporter.pid" 29 trap "rm -f \"$pidfile\"" EXIT 42 echo $! > "$pidfile" 47 if test -s "$pidfile"; then 48 kill `cat "$pidfile"` 50 if kill -0 `cat "$pidfile"` >/dev/null 2>&1; then 53 kill `cat "$pidfile"` >/dev/null 2>&1 62 if test -s "$pidfile"; then 63 if kill -0 `cat "$pidfile"`; then 77 echo "reporter ("`cat "$pidfile"`") is running" [all …]
|
| H A D | unbound.init_fedora | 27 pidfile="/var/run/unbound/unbound.pid" 58 killproc -p $pidfile unbound 76 kill -HUP `cat $pidfile` 85 status -p $pidfile unbound 89 rh_status -p $pidfile >/dev/null 2>&1
|
| H A D | unbound.init | 27 pidfile="/var/unbound/unbound.pid" 74 killproc -p $pidfile $prog 93 kill -HUP `cat $pidfile` 102 status -p $pidfile $prog 106 rh_status -p $pidfile >/dev/null 2>&1
|
| /freebsd-12.1/contrib/unbound/daemon/ |
| H A D | unbound.c | 340 pidfile, strerror(errno)); in writepid() 481 if(cfg->pidfile && cfg->pidfile[0] && need_pidfile) { in perform_setup() 483 if(cfg->pidfile[0] == '/') in perform_setup() 484 daemon->pidfile = strdup(cfg->pidfile); in perform_setup() 485 else daemon->pidfile = fname_after_chroot(cfg->pidfile, in perform_setup() 487 if(!daemon->pidfile) in perform_setup() 500 if(cfg->pidfile && cfg->pidfile[0] && need_pidfile) { in perform_setup() 553 if(daemon->pidfile && daemon->pidfile[0] && in perform_setup() 559 if(!daemon->pidfile) in perform_setup() 684 if(daemon->pidfile) { in run_daemon() [all …]
|
| /freebsd-12.1/bin/pkill/tests/ |
| H A D | pgrep-LF_test.sh | 9 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
|
| H A D | pkill-LF_test.sh | 9 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
|
| H A D | pkill-F_test.sh | 9 pidfile=$(pwd)/pidfile.txt 14 echo $! > $pidfile 15 pkill -f -F $pidfile $sleep 26 rm -f $pidfile
|
| H A D | pgrep-F_test.sh | 9 pidfile=$(pwd)/pidfile.txt 15 echo $chpid > $pidfile 16 pid=`pgrep -f -F $pidfile $sleep` 23 rm -f $pidfile
|
| /freebsd-12.1/contrib/netbsd-tests/lib/libutil/ |
| H A D | t_pidfile.c | 149 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() 284 if (pidfile("./second.pid") == -1) in helper_change_paths() 314 if (pidfile(NULL) == -1) in helper_mix() 318 if (pidfile("./second.pid") == -1) in helper_mix() [all …]
|
| /freebsd-12.1/libexec/rc/rc.d/ |
| H A D | pflog | 16 pidfile="/var/run/pflogd.pid" 43 pidfile=$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||') 46 rc_flags="-p $pidfile -f $pflog_logfile -i $pflog_dev $rc_flags" 60 rm $pidfile 91 pidfile="/var/run/pflogd.$2.pid"
|
| H A D | hostapd | 20 pidfile="/var/run/${name}.pid" 24 pidfile="/var/run/${name}-${ifn}.pid" 27 command_args="-P ${pidfile} -B ${conf_file}"
|
| H A D | moused | 18 pidfile="${pidprefix}.pid" 28 pidfile="${pidprefix}.$2.pid" 29 pidarg="-I $pidfile"
|
| H A D | bsnmpd | 18 pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}" 19 command_args="-p ${pidfile}"
|
| H A D | devd | 24 pidfile="$_pidfile_from_conf" 26 pidfile="/var/run/${name}.pid"
|
| /freebsd-12.1/usr.sbin/ipfwpcap/ |
| H A D | ipfwpcap.c | 69 static char pidfile[MAXPATHLEN]; variable 77 (void) unlink(pidfile); in quit() 91 if (pidfile[0] == '\0') { in okay() 95 snprintf(pidfile, sizeof pidfile, in okay() 99 fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644); in okay() 101 perror(pidfile); in okay() 113 perror(pidfile); in okay() 188 strcpy(pidfile, optarg); in main()
|
| /freebsd-12.1/lib/libutil/ |
| H A D | Makefile | 20 pidfile.c property.c pty.c pw_scan.c pw_util.c quotafile.c \ 36 login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \ 58 MLINKS+=pidfile.3 pidfile_close.3 \ 59 pidfile.3 pidfile_fileno.3 \ 60 pidfile.3 pidfile_open.3 \ 61 pidfile.3 pidfile_remove.3 \ 62 pidfile.3 pidfile_write.3
|
| /freebsd-12.1/bin/pkill/ |
| H A D | pkill.c | 183 pidfile = NULL; in main() 195 pidfile = optarg; in main() 302 if (pidfile != NULL) in main() 303 pidfromfile = takepid(pidfile, pidfilelock); in main() 807 takepid(const char *pidfile, int pidfilelock) in takepid() argument 813 fh = fopen(pidfile, "r"); in takepid() 815 err(STATUS_ERROR, "Cannot open pidfile `%s'", pidfile); in takepid() 824 errx(STATUS_ERROR, "File '%s' can be locked", pidfile); in takepid() 828 "Error while locking file '%s'", pidfile); in takepid() 836 errx(STATUS_ERROR, "Pidfile `%s' is empty", pidfile); in takepid() [all …]
|
| /freebsd-12.1/usr.sbin/daemon/ |
| H A D | daemon.c | 82 const char *pidfile, *ppidfile, *title, *user, *outfn, *logtag; in main() local 93 ppidfile = pidfile = user = NULL; in main() 125 pidfile = optarg; in main() 184 open_pid_files(pidfile, ppidfile, &pfh, &ppfh); in main() 203 if (pidfile || ppidfile || restart || outfd != -1 || dosyslog) { in main() 394 open_pid_files(const char *pidfile, const char *ppidfile, in open_pid_files() argument 400 if (pidfile) { in open_pid_files() 401 *pfh = pidfile_open(pidfile, 0600, &fpid); in open_pid_files() 407 err(2, "pidfile ``%s''", pidfile); in open_pid_files()
|
| /freebsd-12.1/contrib/ofed/infiniband-diags/src/ |
| H A D | rdma-ndd.c | 71 char *pidfile = NULL; variable 210 pidfile = optarg; in process_opts() 361 if (pidfile) in remove_pidfile() 362 unlink(pidfile); in remove_pidfile() 368 if (pidfile) { in write_pidfile() 370 f = fopen(pidfile, "w"); in write_pidfile() 376 pidfile); in write_pidfile()
|
| /freebsd-12.1/sbin/iscontrol/ |
| H A D | iscontrol.c | 140 char *pname, *pidfile, *p, *q, *ta, *kw, *v; in main() local 154 pidfile = NULL; in main() 195 pidfile = optarg; in main() 257 op->pidfile = pidfile; in main()
|
| /freebsd-12.1/usr.sbin/route6d/misc/ |
| H A D | chkrt | 6 $pidfile="/var/run/route6d.pid"; 10 open(FD, "< $pidfile") || die "Can not open $pidfile";
|
| /freebsd-12.1/contrib/hyperv/tools/scripts/ |
| H A D | hyperv_vfup | 63 pidfile=/var/run/dhclient.$hn.pid 64 if [ -f $pidfile ] 66 kill -TERM `cat $pidfile`
|
| /freebsd-12.1/usr.sbin/unbound/setup/ |
| H A D | local-unbound-setup.sh | 48 pidfile="" 89 : ${pidfile:=/var/run/local_unbound.pid} 201 echo "unbound_pid=\"${pidfile}\"" 260 echo " pidfile: ${pidfile}" 375 pidfile="$OPTARG"
|
| /freebsd-12.1/usr.sbin/bluetooth/btpand/ |
| H A D | tap.c | 60 char pidfile[PATH_MAX]; in tap_init() local 121 snprintf(pidfile, sizeof(pidfile), "%s/%s.pid", in tap_init() 123 chan->pfh = pidfile_open(pidfile, 0600, NULL); in tap_init()
|
| /freebsd-12.1/contrib/pf/authpf/ |
| H A D | authpf.c | 71 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()
|