Home
last modified time | relevance | path

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

12

/dragonfly/etc/rc.d/
H A Dvkernel20 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 Dmoused16 pidfile="${pidprefix}.pid"
26 pidfile="${pidprefix}.$2.pid"
27 pidarg="-I $pidfile"
H A Dftpd11 pidfile="/var/run/${name}.pid"
13 command_args="-D -p $pidfile"
H A Ddevd23 pidfile="$_pidfile_from_conf"
25 pidfile="/var/run/${name}.pid"
H A Ddhcpcd43 pidfile=$($command -P $_flags $command_args 2>/dev/null)
44 : ${pidfile:=/var/run/$name.pid}
H A Dsendmail22 pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
91 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
H A Dcron18 pidfile="/var/run/${name}.pid"
H A Dautounmountd12 pidfile="/var/run/${name}.pid"
H A Dbthcid16 pidfile="/var/run/${name}.pid"
H A Dautomountd13 pidfile="/var/run/${name}.pid"
/dragonfly/lib/libutil/
H A DMakefile29 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 Dcmd_abort.c61 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 Dpkill.c177 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 Ddaemon.c83 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 Dsubs.c106 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 Dchkrt6 $pidfile="/var/run/route6d.pid";
10 open(FD, "< $pidfile") || die "Can not open $pidfile";
/dragonfly/usr.sbin/authpf/
H A Dauthpf.c66 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 Dvknetd.c60 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 Dpppoed.c508 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 Dmisc.c238 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 Dnscd.c592 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 Dsliplogin.c357 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 Drc.subr331 # 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 Dusbhidaction.c52 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 Dbthcid.c66 const char *pidfile = NULL; in main() local
135 pfh = pidfile_open(pidfile, 600, NULL); in main()

12