/freebsd-current/lib/libutil/ |
H A D | pidfile.c | 56 static int _pidfile_remove(struct pidfh *pfh, int freeit); 59 pidfile_verify(const struct pidfh *pfh) argument 63 if (pfh == NULL || pfh->pf_fd == -1) 68 if (fstat(pfh->pf_fd, &sb) == -1) 70 if (sb.st_dev != pfh->pf_dev || sb.st_ino != pfh->pf_ino) 125 struct pidfh *pfh; local 130 pfh = malloc(sizeof(*pfh)); 230 pidfile_write(struct pidfh *pfh) argument 270 pidfile_close(struct pidfh *pfh) argument 294 _pidfile_remove(struct pidfh *pfh, int freeit) argument 325 pidfile_remove(struct pidfh *pfh) argument 332 pidfile_fileno(const struct pidfh *pfh) argument [all...] |
/freebsd-current/contrib/openbsm/compat/ |
H A D | pidfile.h | 51 static int _pidfile_remove(struct pidfh *pfh, int freeit); 54 pidfile_verify(const struct pidfh *pfh) argument 58 if (pfh == NULL || pfh->pf_fd == -1) 63 if (fstat(pfh->pf_fd, &sb) == -1) 65 if (sb.st_dev != pfh->pf_dev || sb.st_ino != pfh->pf_ino) 99 struct pidfh *pfh; local 110 pfh = malloc(sizeof(*pfh)); 186 pidfile_write(struct pidfh *pfh) argument 226 pidfile_close(struct pidfh *pfh) argument 247 _pidfile_remove(struct pidfh *pfh, int freeit) argument 275 pidfile_remove(struct pidfh *pfh) argument [all...] |
/freebsd-current/usr.sbin/nvmfd/ |
H A D | nvmfd.c | 150 struct pidfh *pfh; local 160 pfh = NULL; 230 pfh = pidfile_open(NULL, 0600, &pid); 231 if (pfh == NULL) { 239 pidfile_remove(pfh); 243 pidfile_write(pfh); 248 pidfile_remove(pfh); 257 if (pfh != NULL) 258 pidfile_remove(pfh);
|
/freebsd-current/sbin/hastd/ |
H A D | hastd.h | 44 extern struct pidfh *pfh;
|
H A D | hastd.c | 71 struct pidfh *pfh; variable in typeref:struct:pidfh 135 (void)pidfile_close(pfh); 585 (void)pidfile_remove(pfh); 586 pfh = newpfh; 1129 KEEP_ERRNO((void)pidfile_remove(pfh)); 1252 pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid); 1253 if (pfh == NULL) { 1291 KEEP_ERRNO((void)pidfile_remove(pfh)); 1298 KEEP_ERRNO((void)pidfile_remove(pfh)); 1306 KEEP_ERRNO((void)pidfile_remove(pfh)); [all...] |
/freebsd-current/sys/contrib/openzfs/lib/libshare/os/freebsd/ |
H A D | nfs.c | 172 struct pidfh *pfh; local 176 pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); 177 if (pfh != NULL) { 179 pidfile_remove(pfh);
|
/freebsd-current/usr.sbin/cron/cron/ |
H A D | globals.h | 63 XTRN struct pidfh *pfh; variable in typeref:struct:pidfh
|
H A D | cron.c | 49 struct pidfh *pfh; variable in typeref:struct:pidfh 79 pfh = pidfile_open(pidfile, 0600, &otherpid); 80 if (pfh == NULL) { 129 pidfile_remove(pfh); 138 pidfile_write(pfh);
|
/freebsd-current/contrib/pf/tftp-proxy/ |
H A D | filter.c | 65 static struct pfctl_handle *pfh = NULL; variable in typeref:struct:pfctl_handle 81 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 111 if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1) 116 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 145 if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1) 149 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 159 if (ioctl(pfctl_fd(pfh), DIOCXCOMMIT, &pft) == -1) 168 if (ioctl(pfctl_fd(pfh), DIOCXROLLBACK, &pft) == -1) 186 pfh = pfctl_open(PF_DEVICE); 187 if (pfh [all...] |
/freebsd-current/contrib/pf/ftp-proxy/ |
H A D | filter.c | 61 static struct pfctl_handle *pfh = NULL; variable in typeref:struct:pfctl_handle 77 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 107 if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1) 112 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 141 if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1) 145 if (pfctl_add_rule_h(pfh, &pfrule, pfanchor, pfanchor_call, 155 if (ioctl(pfctl_fd(pfh), DIOCXCOMMIT, &pft) == -1) 164 if (ioctl(pfctl_fd(pfh), DIOCXROLLBACK, &pft) == -1) 183 pfh = pfctl_open(PF_DEVICE); 184 if (pfh [all...] |
/freebsd-current/usr.sbin/bluetooth/btpand/ |
H A D | tap.c | 122 chan->pfh = pidfile_open(pidfile, 0600, NULL); 123 if (chan->pfh == NULL) 125 else if (pidfile_write(chan->pfh) < 0) { 127 pidfile_remove(chan->pfh); 128 chan->pfh = NULL;
|
H A D | channel.c | 139 if (chan->pfh != NULL) { 140 pidfile_remove(chan->pfh); 141 chan->pfh = NULL;
|
H A D | btpand.h | 110 struct pidfh *pfh; member in struct:channel
|
/freebsd-current/contrib/pf/authpf/ |
H A D | authpf.c | 59 struct pfctl_handle *pfh; variable in typeref:struct:pfctl_handle 137 pfh = pfctl_open(PATH_DEVFILE); 138 if (pfh == NULL) { 649 if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, &prs)) { 662 if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, &prs)) 706 if ((ioctl(pfctl_fd(pfh), DIOCXBEGIN, t) || 707 ioctl(pfctl_fd(pfh), DIOCXCOMMIT, t)) && 715 if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, prs)) { 724 if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, prs)) 770 if (asprintf(&fdpath, "/dev/fd/%d", pfctl_fd(pfh)) [all...] |
/freebsd-current/lib/libutil/tests/ |
H A D | pidfile_test.c | 270 struct pidfh *pfh; local 278 pfh = pidfile_open(path, 0600, NULL); 279 if (pfh == NULL) 281 if (pidfile_write(pfh) != 0) 293 if (pidfile_close(pfh) != 0)
|
/freebsd-current/contrib/openbsm/bin/auditdistd/ |
H A D | auditdistd.c | 89 struct pidfh *pfh; variable in typeref:struct:pidfh 119 (void)pidfile_close(pfh); 548 KEEP_ERRNO((void)pidfile_remove(pfh)); 725 pfh = NULL; 727 pfh = pidfile_open(adcfg->adc_pidfile, 0600, &otherpid); 728 if (pfh == NULL) { 767 KEEP_ERRNO((void)pidfile_remove(pfh)); 775 KEEP_ERRNO((void)pidfile_remove(pfh)); 782 if (pfh != NULL) { 784 if (pidfile_write(pfh) < [all...] |
/freebsd-current/usr.sbin/watchdogd/ |
H A D | watchdogd.c | 121 struct pidfh *pfh; local 145 pfh = pidfile_open(pidfile, 0600, &otherpid); 146 if (pfh == NULL) { 157 pidfile_remove(pfh); 165 pidfile_write(pfh); 174 pidfile_remove(pfh);
|
/freebsd-current/usr.sbin/rtsold/ |
H A D | rtsold.c | 104 static struct pidfh *pfh; variable in typeref:struct:pidfh 217 pfh = pidfile_open(pidfilepath, 0644, NULL); 218 if (pfh == NULL) 279 if (pfh != NULL && pidfile_write(pfh) != 0) { 295 if (pfh != NULL) 296 pidfile_remove(pfh);
|
/freebsd-current/usr.sbin/bsnmpd/modules/snmp_pf/ |
H A D | pf_snmp.c | 53 static struct pfctl_handle *pfh; variable in typeref:struct:pfctl_handle 344 if (ioctl(pfctl_fd(pfh), DIOCGETLIMIT, &pl)) { 434 if (ioctl(pfctl_fd(pfh), DIOCGETTIMEOUT, &pt)) { 1177 if (ioctl(pfctl_fd(pfh), DIOCIGETIFACES, &io)) { 1234 if (ioctl(pfctl_fd(pfh), DIOCGETALTQS, &pa)) { 1254 if (ioctl(pfctl_fd(pfh), DIOCGETALTQ, &pa)) { 1290 pfs = pfctl_get_status_h(pfh); 1332 if (ioctl(pfctl_fd(pfh), DIOCRGETTSTATS, &io)) { 1399 if (ioctl(pfctl_fd(pfh), DIOCRGETASTATS, &io)) { 1467 if (ioctl(pfctl_fd(pfh), DIOCRGETTABLE [all...] |
/freebsd-current/usr.sbin/powerd/ |
H A D | powerd.c | 489 struct pidfh *pfh = NULL; local 606 pfh = pidfile_open(pidfile, 0600, &otherpid); 607 if (pfh == NULL) { 616 pidfile_remove(pfh); 620 pidfile_write(pfh); 839 pidfile_remove(pfh);
|
/freebsd-current/usr.sbin/uhsoctl/ |
H A D | uhsoctl.c | 109 struct pidfh *pfh; member in struct:ctx 1290 struct pidfh *pfh; local 1295 pfh = pidfile_open(ctx->pidfile, 0600, &opid); 1296 if (pfh == NULL) { 1303 pidfile_remove(pfh); 1307 pidfile_write(pfh); 1308 ctx->pfh = pfh; 1555 pidfile_remove(ctx.pfh);
|
/freebsd-current/sbin/devd/ |
H A D | devd.cc | 145 static struct pidfh *pfh; variable in typeref:struct:pidfh 536 pfh = pidfile_open(_pidfile.c_str(), 0600, &otherpid); 537 if (pfh == NULL) { 548 pidfile_write(pfh); 555 pidfile_close(pfh); 562 pidfile_remove(pfh);
|
/freebsd-current/sbin/pfctl/ |
H A D | pfctl.c | 147 struct pfctl_handle *pfh = NULL; variable in typeref:struct:pfctl_handle 316 if ((ret = pfctl_startstop(pfh, 1)) != 0) { 339 if ((ret = pfctl_startstop(pfh, 0)) != 0) { 548 if (pfctl_clear_states_h(pfh, &kill, &killed)) 804 if (pfctl_kill_states_h(pfh, &kill, &newkilled)) 810 if (pfctl_kill_states_h(pfh, &kill, &newkilled)) 876 if (pfctl_kill_states_h(pfh, &kill, &newkilled)) 910 if (pfctl_kill_states_h(pfh, &kill, &killed)) 949 if (pfctl_kill_states_h(pfh, &kill, &killed)) 1286 ret = pfctl_get_rules_info_h(pfh, [all...] |
/freebsd-current/tools/tools/net80211/wesside/wesside/ |
H A D | wesside.c | 2400 struct pcap_file_header pfh; local 2402 memset(&pfh, 0, sizeof(pfh)); 2403 pfh.magic = TCPDUMP_MAGIC; 2404 pfh.version_major = PCAP_VERSION_MAJOR; 2405 pfh.version_minor = PCAP_VERSION_MINOR; 2406 pfh.thiszone = 0; 2407 pfh.sigfigs = 0; 2408 pfh.snaplen = 65535; 2409 pfh [all...] |
/freebsd-current/sbin/ggate/ggated/ |
H A D | ggated.c | 978 struct pidfh *pfh; local 1036 pfh = pidfile_open(ggated_pidfile, 0600, &otherpid); 1037 if (pfh == NULL) { 1051 pidfile_write(pfh); 1089 pidfile_remove(pfh);
|