/freebsd-12-stable/lib/libutil/ |
H A D | pidfile.c | 57 static int _pidfile_remove(struct pidfh *pfh, int freeit); 60 pidfile_verify(const struct pidfh *pfh) argument 64 if (pfh == NULL || pfh->pf_fd == -1) 69 if (fstat(pfh->pf_fd, &sb) == -1) 71 if (sb.st_dev != pfh->pf_dev || sb.st_ino != pfh->pf_ino) 106 struct pidfh *pfh; local 112 pfh = malloc(sizeof(*pfh)); 222 pidfile_write(struct pidfh *pfh) argument 262 pidfile_close(struct pidfh *pfh) argument 286 _pidfile_remove(struct pidfh *pfh, int freeit) argument 314 pidfile_remove(struct pidfh *pfh) argument 321 pidfile_fileno(const struct pidfh *pfh) argument [all...] |
/freebsd-12-stable/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-12-stable/sys/net/ |
H A D | pfil.c | 102 struct packet_filter_hook *pfh; local 108 for (pfh = pfil_chain_get(dir, ph); pfh != NULL; 109 pfh = TAILQ_NEXT(pfh, pfil_chain)) { 110 if (pfh->pfil_func_flags != NULL) { 111 rv = (*pfh->pfil_func_flags)(pfh->pfil_arg, &m, ifp, 116 if (pfh->pfil_func != NULL) { 117 rv = (*pfh 236 struct packet_filter_hook *pfh, *pfnext; local 393 struct packet_filter_hook *pfh; local 422 struct packet_filter_hook *pfh; local [all...] |
/freebsd-12-stable/sbin/hastd/ |
H A D | hastd.h | 46 extern struct pidfh *pfh;
|
H A D | hastd.c | 74 struct pidfh *pfh; variable in typeref:struct:pidfh 138 (void)pidfile_close(pfh); 588 (void)pidfile_remove(pfh); 589 pfh = newpfh; 1132 KEEP_ERRNO((void)pidfile_remove(pfh)); 1255 pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid); 1256 if (pfh == NULL) { 1294 KEEP_ERRNO((void)pidfile_remove(pfh)); 1301 KEEP_ERRNO((void)pidfile_remove(pfh)); 1309 KEEP_ERRNO((void)pidfile_remove(pfh)); [all...] |
/freebsd-12-stable/usr.sbin/bluetooth/btpand/ |
H A D | tap.c | 123 chan->pfh = pidfile_open(pidfile, 0600, NULL); 124 if (chan->pfh == NULL) 126 else if (pidfile_write(chan->pfh) < 0) { 128 pidfile_remove(chan->pfh); 129 chan->pfh = NULL;
|
H A D | channel.c | 140 if (chan->pfh != NULL) { 141 pidfile_remove(chan->pfh); 142 chan->pfh = NULL;
|
H A D | btpand.h | 111 struct pidfh *pfh; member in struct:channel
|
/freebsd-12-stable/usr.sbin/daemon/ |
H A D | daemon.c | 88 struct pidfh *ppfh, *pfh; local 179 ppfh = pfh = NULL; 184 open_pid_files(pidfile, ppidfile, &pfh, &ppfh); 280 pidfile_write(pfh); 379 pidfile_remove(pfh); 397 struct pidfh **pfh, struct pidfh **ppfh) 403 *pfh = pidfile_open(pidfile, 0600, &fpid); 404 if (*pfh == NULL) { 417 pidfile_remove(*pfh); 396 open_pid_files(const char *pidfile, const char *ppidfile, struct pidfh **pfh, struct pidfh **ppfh) argument
|
/freebsd-12-stable/cddl/compat/opensolaris/misc/ |
H A D | fsshare.c | 50 struct pidfh *pfh; local 53 pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); 54 if (pfh != NULL) { 56 pidfile_remove(pfh);
|
/freebsd-12-stable/lib/libutil/tests/ |
H A D | pidfile_test.c | 273 struct pidfh *pfh; local 281 pfh = pidfile_open(path, 0600, NULL); 282 if (pfh == NULL) 284 if (pidfile_write(pfh) != 0) 295 if (pidfile_close(pfh) != 0)
|
/freebsd-12-stable/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...] |
H A D | auditdistd.h | 275 extern struct pidfh *pfh;
|
/freebsd-12-stable/usr.sbin/watchdogd/ |
H A D | watchdogd.c | 123 struct pidfh *pfh; local 147 pfh = pidfile_open(pidfile, 0600, &otherpid); 148 if (pfh == NULL) { 159 pidfile_remove(pfh); 167 pidfile_write(pfh); 176 pidfile_remove(pfh);
|
/freebsd-12-stable/usr.sbin/cron/cron/ |
H A D | cron.c | 55 struct pidfh *pfh; variable in typeref:struct:pidfh 85 pfh = pidfile_open(pidfile, 0600, &otherpid); 86 if (pfh == NULL) { 143 pidfile_remove(pfh); 152 pidfile_write(pfh);
|
/freebsd-12-stable/usr.sbin/rtsold/ |
H A D | rtsold.c | 104 static struct pidfh *pfh; variable in typeref:struct:pidfh 208 pfh = pidfile_open(pidfilepath, 0644, NULL); 209 if (pfh == NULL) 270 if (pfh != NULL && pidfile_write(pfh) != 0) { 286 if (pfh != NULL) 287 pidfile_remove(pfh);
|
/freebsd-12-stable/usr.sbin/powerd/ |
H A D | powerd.c | 492 struct pidfh *pfh = NULL; local 609 pfh = pidfile_open(pidfile, 0600, &otherpid); 610 if (pfh == NULL) { 619 pidfile_remove(pfh); 623 pidfile_write(pfh); 842 pidfile_remove(pfh);
|
/freebsd-12-stable/sys/netpfil/ipfw/ |
H A D | ip_fw_pfil.c | 541 struct pfil_head *pfh; local 544 pfh = pfil_head_get(PFIL_TYPE_AF, pf); 545 if (pfh == NULL) 551 (hook_func, NULL, PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh); local
|
/freebsd-12-stable/contrib/wpa/src/utils/ |
H A D | os_unix.c | 234 struct pidfh *pfh; 236 pfh = pidfile_open(pid_file, 0600, &otherpid); 237 if (pfh == NULL) { 249 pidfile_remove(pfh); 263 pidfile_write(pfh);
|
/freebsd-12-stable/usr.sbin/uhsoctl/ |
H A D | uhsoctl.c | 111 struct pidfh *pfh; member in struct:ctx 1292 struct pidfh *pfh; local 1297 pfh = pidfile_open(ctx->pidfile, 0600, &opid); 1298 if (pfh == NULL) { 1305 pidfile_remove(pfh); 1309 pidfile_write(pfh); 1310 ctx->pfh = pfh; 1557 pidfile_remove(ctx.pfh);
|
/freebsd-12-stable/sbin/devd/ |
H A D | devd.cc | 149 static struct pidfh *pfh; variable in typeref:struct:pidfh 527 pfh = pidfile_open(_pidfile.c_str(), 0600, &otherpid); 528 if (pfh == NULL) { 539 pidfile_write(pfh); 546 pidfile_close(pfh); 553 pidfile_remove(pfh);
|
/freebsd-12-stable/tools/tools/net80211/wesside/wesside/ |
H A D | wesside.c | 2401 struct pcap_file_header pfh; local 2403 memset(&pfh, 0, sizeof(pfh)); 2404 pfh.magic = TCPDUMP_MAGIC; 2405 pfh.version_major = PCAP_VERSION_MAJOR; 2406 pfh.version_minor = PCAP_VERSION_MINOR; 2407 pfh.thiszone = 0; 2408 pfh.sigfigs = 0; 2409 pfh.snaplen = 65535; 2410 pfh [all...] |
/freebsd-12-stable/libexec/tftpd/tests/ |
H A D | functional.c | 299 struct pidfh *pfh; local 333 pfh = pidfile_open(pidfile, 0644, NULL); 334 ATF_REQUIRE_MSG(pfh != NULL, 336 ATF_REQUIRE_EQ(pidfile_write(pfh), 0); 337 ATF_REQUIRE_EQ(pidfile_close(pfh), 0);
|
/freebsd-12-stable/sbin/ggate/ggated/ |
H A D | ggated.c | 967 struct pidfh *pfh; local 1025 pfh = pidfile_open(ggated_pidfile, 0600, &otherpid); 1026 if (pfh == NULL) { 1040 pidfile_write(pfh); 1078 pidfile_remove(pfh);
|
/freebsd-12-stable/sbin/mount/ |
H A D | mount.c | 228 struct pidfh *pfh; local 232 pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); 233 if (pfh != NULL) { 235 pidfile_remove(pfh);
|