/dragonfly/etc/rc.d/ |
H A D | vkernel | 20 unset pidfile bin memsize rootimgs ifaces logfile flags 34 if [ -f "${pidfile}" ]; then 35 eval pid=`cat ${pidfile}` 38 warn "vkernel ${_vkernel} already running? (check ${pidfile})" 43 install -c -o ${vkuser} -g ${vkgroup} /dev/null ${pidfile} 126 "${memimg} ${ifaces} ${flags} -p ${pidfile}" \ 138 if [ -f "${pidfile}" ]; then 139 eval pid=`cat ${pidfile}`
|
H A D | moused | 16 pidfile="${pidprefix}.pid" 26 pidfile="${pidprefix}.$2.pid" 27 pidarg="-I $pidfile"
|
H A D | ftpd | 11 pidfile="/var/run/${name}.pid" 13 command_args="-D -p $pidfile"
|
H A D | devd | 23 pidfile="$_pidfile_from_conf" 25 pidfile="/var/run/${name}.pid"
|
H A D | dhcpcd | 43 pidfile=$($command -P $_flags $command_args 2>/dev/null) 44 : ${pidfile:=/var/run/$name.pid}
|
H A D | sendmail | 22 pidfile=${sendmail_pidfile:-/var/run/sendmail.pid} 91 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
|
H A D | cron | 18 pidfile="/var/run/${name}.pid"
|
H A D | autounmountd | 12 pidfile="/var/run/${name}.pid"
|
H A D | bthcid | 16 pidfile="/var/run/${name}.pid"
|
H A D | automountd | 13 pidfile="/var/run/${name}.pid"
|
/dragonfly/lib/libutil/ |
H A D | Makefile | 29 pidfile.c \ 63 pidfile.3 \ 118 MLINKS+=pidfile.3 pidfile_close.3 \ 119 pidfile.3 pidfile_fileno.3 \ 120 pidfile.3 pidfile_open.3 \ 121 pidfile.3 pidfile_remove.3 \ 122 pidfile.3 pidfile_write.3
|
/dragonfly/sbin/hammer/ |
H A D | cmd_abort.c | 61 static char pidfile[PIDFILE_BUFSIZE]; in hammer_cmd_abort_cleanup() local 71 snprintf (pidfile, PIDFILE_BUFSIZE, "%s/%s", in hammer_cmd_abort_cleanup() 74 pf_fd = open(pidfile, O_RDONLY | O_CLOEXEC); in hammer_cmd_abort_cleanup() 89 unlink (pidfile); in hammer_cmd_abort_cleanup()
|
/dragonfly/usr.bin/pkill/ |
H A D | pkill.c | 177 pidfile = NULL; in main() 189 pidfile = optarg; in main() 306 if (pidfile != NULL) in main() 307 pidfromfile = takepid(pidfile, pidfilelock); in main() 802 takepid(const char *pidfile, int pidfilelock) in takepid() argument 808 fh = fopen(pidfile, "r"); in takepid() 810 err(STATUS_ERROR, "Cannot open pidfile `%s'", pidfile); in takepid() 819 errx(STATUS_ERROR, "File '%s' can be locked", pidfile); in takepid() 823 "Error while locking file '%s'", pidfile); in takepid() 831 errx(STATUS_ERROR, "Pidfile `%s' is empty", pidfile); in takepid() [all …]
|
/dragonfly/usr.sbin/daemon/ |
H A D | daemon.c | 83 const char *pidfile, *ppidfile, *title, *user, *outfn, *logtag; in main() local 94 ppidfile = pidfile = user = NULL; in main() 126 pidfile = optarg; in main() 185 open_pid_files(pidfile, ppidfile, &pfh, &ppfh); in main() 204 if (pidfile || ppidfile || restart || outfd != -1 || dosyslog) { in main() 442 open_pid_files(const char *pidfile, const char *ppidfile, in open_pid_files() argument 448 if (pidfile) { in open_pid_files() 449 *pfh = pidfile_open(pidfile, 0600, &fpid); in open_pid_files() 455 err(2, "pidfile ``%s''", pidfile); in open_pid_files()
|
/dragonfly/sbin/svc/ |
H A D | subs.c | 106 char *pidfile; in setup_pid_and_socket() local 111 asprintf(&pidfile, "%s/service.%s.pid", cmd->piddir, cmd->label); in setup_pid_and_socket() 113 *pfdp = open(pidfile, O_RDWR|O_CREAT|O_EXLOCK|O_NONBLOCK, 0640); in setup_pid_and_socket() 114 free(pidfile); in setup_pid_and_socket()
|
/dragonfly/usr.sbin/route6d/misc/ |
H A D | chkrt | 6 $pidfile="/var/run/route6d.pid"; 10 open(FD, "< $pidfile") || die "Can not open $pidfile";
|
/dragonfly/usr.sbin/authpf/ |
H A D | authpf.c | 66 char pidfile[MAXPATHLEN]; /* we save pid in this file. */ variable 178 n = snprintf(pidfile, sizeof(pidfile), "%s/%s", PATH_PIDFILE, ipsrc); in main() 179 if (n < 0 || (u_int)n >= sizeof(pidfile)) { in main() 203 if ((pidfd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1 || in main() 207 syslog(LOG_ERR, "cannot open or create %s: %s", pidfile, in main() 223 pidfile, otherpid, strerror(save_errno)); in main() 825 if (pidfile[0] && (pidfp != NULL)) in do_death() 826 if (unlink(pidfile) == -1) in do_death() 827 syslog(LOG_ERR, "cannot unlink %s (%m)", pidfile); in do_death()
|
/dragonfly/usr.sbin/vknetd/ |
H A D | vknetd.c | 60 static const char *pidfile = "/var/run/vknetd.pid"; variable 93 pidfile = optarg; in main() 499 if ((pf = fopen(pidfile, "w+")) == NULL) in writepid() 500 errx(1, "Failed to create pidfile %s", pidfile); in writepid() 511 if (pidfile) in cleanup() 512 unlink(pidfile); in cleanup()
|
/dragonfly/libexec/pppoed/ |
H A D | pppoed.c | 508 const char *pidfile; in main() local 512 pidfile = NULL; in main() 526 pidfile = optarg; in main() 621 if (pidfile != NULL) { in main() 624 if ((fp = fopen(pidfile, "w")) == NULL) { in main() 625 perror(pidfile); in main() 679 if (pidfile) in main() 680 remove(pidfile); in main()
|
/dragonfly/usr.sbin/cron/lib/ |
H A D | misc.c | 238 char pidfile[MAX_FNAME]; in acquire_daemonlock() local 242 sprintf(pidfile, PIDFILE, PIDDIR); in acquire_daemonlock() 243 if ((-1 == (fd = open(pidfile, O_RDWR|O_CREAT, 0644))) in acquire_daemonlock() 247 pidfile, strerror(errno)); in acquire_daemonlock() 257 pidfile, otherpid, strerror(save_errno)); in acquire_daemonlock()
|
/dragonfly/usr.sbin/nscd/ |
H A D | nscd.c | 592 struct pidfh *pidfile; in main() local 733 pidfile = pidfile_open(DEFAULT_PIDFILE_PATH, 0644, &pid); in main() 734 if (pidfile == NULL) { in main() 753 pidfile_remove(pidfile); in main() 759 pidfile_write(pidfile); in main() 865 pidfile_remove(pidfile); in main()
|
/dragonfly/usr.sbin/sliplogin/ |
H A D | sliplogin.c | 357 FILE *pidfile; /* pid file */ in main() local 457 if ((pidfile = fopen(pidfilename, "w")) != NULL) { in main() 458 fprintf(pidfile, "%d\n", pid); in main() 459 fclose(pidfile); in main()
|
/dragonfly/etc/ |
H A D | rc.subr | 331 # check_pidfile pidfile procname [interpreter] 476 # pidfile="$_pidfile_from_conf" 478 # pidfile='appropriate default' 558 # pidfile n If set, use check_pidfile $pidfile $command, 643 # stop if ${pidfile} 756 if [ -n "$pidfile" ]; then 964 if [ -n "$pidfile" ]; then 1009 if [ -n "$pidfile" ]; then 1157 if [ -n "$pidfile" ]; then 1158 _pidmsg=" (check $pidfile)." [all …]
|
/dragonfly/usr.bin/usbhidaction/ |
H A D | usbhidaction.c | 52 static const char * pidfile = "/var/run/usbaction.pid"; variable 118 pidfile = optarg; in main() 168 fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); in main() 177 err(1, "%s", pidfile); in main()
|
/dragonfly/usr.sbin/bthcid/ |
H A D | bthcid.c | 66 const char *pidfile = NULL; in main() local 135 pfh = pidfile_open(pidfile, 600, NULL); in main()
|