Home
last modified time | relevance | path

Searched refs:pidfn (Results 1 – 25 of 33) sorted by relevance

12

/dports/x11/inputplug/inputplug-0.4.0/cargo-crates/pidfile-rs-0.1.0/src/
H A Dlib.rs13 enum pidfn {} enum
19 fn bsd_pidfile_write(pfh: *mut pidfn) -> c_int; in bsd_pidfile_write()
21 fn bsd_pidfile_close(pfh: *mut pidfn) -> c_int; in bsd_pidfile_close()
23 fn bsd_pidfile_remove(pfh: *mut pidfn) -> c_int; in bsd_pidfile_remove()
26 fn bsd_pidfile_fileno(pfh: *mut pidfn) -> c_int; in bsd_pidfile_fileno()
90 pidfn: *mut pidfn field
123 let pidfn = unsafe { localVariable
126 if !pidfn.is_null() {
128 pidfn: pidfn
156 bsd_pidfile_write(self.pidfn) == 0
[all …]
/dports/dns/inadyn/inadyn-2.9.0/src/
H A Dos.c214 static pid_t getpid_from_pidfile(char *pidfn) in getpid_from_pidfile() argument
218 fp = fopen(pidfn, "r"); in getpid_from_pidfile()
252 char pidfn[strlen(RUNSTATEDIR) + strlen(pidfile_name) + 6]; in os_check_perms() local
256 snprintf(pidfn, sizeof(pidfn), "%s/%s.pid", RUNSTATEDIR, pidfile_name); in os_check_perms()
258 strlcpy(pidfn, pidfile_name, sizeof(pidfn)); in os_check_perms()
260 if (!access(pidfn, F_OK)) { in os_check_perms()
261 pid_t pid = getpid_from_pidfile(pidfn); in os_check_perms()
264 pidfn, prognm); in os_check_perms()
269 pidfile_dir = dirname(strdupa(pidfn)); in os_check_perms()
H A Dmain.c258 char pidfn[80]; in usage() local
262 snprintf(pidfn, sizeof(pidfn), "%s/%s.pid", RUNSTATEDIR, pidfile_name); in usage()
264 snprintf(pidfn, sizeof(pidfn), "%s", pidfile_name); in usage()
299 prognm, prognm, pidfn, in usage()
471 char pidfn[80]; in main() local
474 strlcpy(pidfn, "<none>", sizeof(pidfn)); in main()
476 snprintf(pidfn, sizeof(pidfn), "%s/%s.pid", RUNSTATEDIR, pidfile_name); in main()
478 snprintf(pidfn, sizeof(pidfn), "%s", pidfile_name); in main()
481 logit(LOG_DEBUG, "pidfile : %s", pidfn); in main()
/dports/mail/nmh/nmh-1.7.1/test/
H A Dserver.c46 serve(const char *pidfn, const char *port) in serve() argument
56 PIDFN = pidfn; in serve()
64 if (stat(pidfn, &st) == 0) { in serve()
67 if (!(pid = fopen(pidfn, "r"))) { in serve()
69 pidfn, strerror(errno)); in serve()
77 pidfn); in serve()
83 unlink(pidfn); in serve()
162 if (!(pid = fopen(pidfn, "w"))) { in serve()
164 pidfn, strerror(errno)); in serve()
/dports/sysutils/nut-devel/nut-9e6a5ab2/drivers/
H A Dupsdrvctl.c143 char pidfn[SMALLBUF]; in stop_driver() local
149 snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(), in stop_driver()
151 ret = stat(pidfn, &fs); in stop_driver()
154 upslog_with_errno(LOG_ERR, "Can't open %s", pidfn); in stop_driver()
155 snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(), in stop_driver()
157 ret = stat(pidfn, &fs); in stop_driver()
161 upslog_with_errno(LOG_ERR, "Can't open %s either", pidfn); in stop_driver()
166 upsdebugx(2, "Sending signal to %s", pidfn); in stop_driver()
171 ret = sendsignalfn(pidfn, SIGTERM); in stop_driver()
174 upslog_with_errno(LOG_ERR, "Stopping %s failed", pidfn); in stop_driver()
H A Dmain.c56 static char *pidfn = NULL; variable
487 if (pidfn) { in exit_cleanup()
488 unlink(pidfn); in exit_cleanup()
489 free(pidfn); in exit_cleanup()
678 pidfn = xstrdup(buffer); in main()
679 writepid(pidfn); /* before backgrounding */ in main()
764 writepid(pidfn); /* PID changes when backgrounding */ in main()
/dports/net/nifmon/nifmon-1.4/
H A Dprocess.c40 check_pid(char *pidfn) in check_pid() argument
46 if ((fp = fopen(pidfn, "r")) != NULL) in check_pid()
73 unlink(pidfn); in check_pid()
91 write_pid(char *pidfn) in write_pid() argument
97 if ((fp = fopen(pidfn, "w")) == NULL) in write_pid()
/dports/sysutils/nut/nut-2.7.4/drivers/
H A Dupsdrvctl.c136 char pidfn[SMALLBUF]; in stop_driver() local
142 snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(), in stop_driver()
144 ret = stat(pidfn, &fs); in stop_driver()
147 snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(), in stop_driver()
149 ret = stat(pidfn, &fs); in stop_driver()
153 upslog_with_errno(LOG_ERR, "Can't open %s", pidfn); in stop_driver()
158 upsdebugx(2, "Sending signal to %s", pidfn); in stop_driver()
163 ret = sendsignalfn(pidfn, SIGTERM); in stop_driver()
166 upslog_with_errno(LOG_ERR, "Stopping %s failed", pidfn); in stop_driver()
H A Dmain.c50 static char *pidfn = NULL; variable
457 if (pidfn) { in exit_cleanup()
458 unlink(pidfn); in exit_cleanup()
459 free(pidfn); in exit_cleanup()
623 pidfn = xstrdup(buffer); in main()
624 writepid(pidfn); /* before backgrounding */ in main()
698 writepid(pidfn); /* PID changes when backgrounding */ in main()
/dports/mail/qmail/netqmail-1.06/
H A Dqmail-queue.c32 char *pidfn; variable
138 pidfn = alloc(len); in pidopen()
139 if (!pidfn) die(51); in pidopen()
144 pidfmt(pidfn,seq); in pidopen()
145 messfd = open_excl(pidfn); in pidopen()
186 if (link(pidfn,messfn) == -1) die(64); in main()
187 if (unlink(pidfn) == -1) die(63); in main()
/dports/mail/qmail-tls/netqmail-1.06/
H A Dqmail-queue.c32 char *pidfn; variable
138 pidfn = alloc(len); in pidopen()
139 if (!pidfn) die(51); in pidopen()
144 pidfmt(pidfn,seq); in pidopen()
145 messfd = open_excl(pidfn); in pidopen()
186 if (link(pidfn,messfn) == -1) die(64); in main()
187 if (unlink(pidfn) == -1) die(63); in main()
/dports/mail/qmail-mysql/netqmail-1.06/
H A Dqmail-queue.c32 char *pidfn; variable
138 pidfn = alloc(len); in pidopen()
139 if (!pidfn) die(51); in pidopen()
144 pidfmt(pidfn,seq); in pidopen()
145 messfd = open_excl(pidfn); in pidopen()
186 if (link(pidfn,messfn) == -1) die(64); in main()
187 if (unlink(pidfn) == -1) die(63); in main()
/dports/mail/qmail-dk/qmail-1.03/
H A Dqmail-queue.c32 char *pidfn; variable
138 pidfn = alloc(len); in pidopen()
139 if (!pidfn) die(51); in pidopen()
144 pidfmt(pidfn,seq); in pidopen()
145 messfd = open_excl(pidfn); in pidopen()
186 if (link(pidfn,messfn) == -1) die(64); in main()
187 if (unlink(pidfn) == -1) die(63); in main()
H A Dqmail-dk.c37 char *pidfn; variable
83 pidfn = alloc(len); in pidopen()
84 if (!pidfn) die(51); in pidopen()
89 pidfmt(pidfn,seq); in pidopen()
90 messfd = open_excl(pidfn); in pidopen()
213 readfd = open_read(pidfn); in main()
214 if (unlink(pidfn) == -1) die(63); in main()
/dports/devel/p5-Any-Daemon/Any-Daemon-0.95/lib/Any/
H A DDaemon.pm100 my $pidfn = $self->{AD_pidfn};
101 if(defined $pidfn)
103 if(open PIDF, '>', $pidfn)
160 unlink $pidfn if $pidfn;
/dports/games/flightgear/flightgear-2020.3.11/utils/TerraSync/
H A Dterrasync.cxx136 bool& testing, int& verbose, int& port, const char* &pidfn) in parseOptions() argument
147 pidfn = argv[i]; in parseOptions()
148 cout << "pidfn: " << pidfn << endl; in parseOptions()
454 const char* pidfn = ""; in main() local
469 parseOptions(argc, argv, config, testing, verbose, port, pidfn); in main()
476 if (*pidfn) in main()
479 pidstream.open(pidfn); in main()
482 cerr << "Cannot open pid file '" << pidfn << "': "; in main()
/dports/sysutils/nut/nut-2.7.4/server/
H A Dupsd.c92 static char pidfn[SMALLBUF]; variable
635 if (strlen(pidfn) > 0) { in upsd_cleanup()
636 unlink(pidfn); in upsd_cleanup()
905 snprintf(pidfn, sizeof(pidfn), "%s/%s.pid", altpidpath(), progname); in main()
962 sendsignalfn(pidfn, cmd); in main()
969 if (sendsignalfn(pidfn, 0) == 0) { in main()
1033 writepid(pidfn); in main()
1035 memset(pidfn, 0, sizeof(pidfn)); in main()
/dports/comms/qico/qico-15673bf/src/
H A Dtools.c315 int islocked(const char *pidfn) in islocked() argument
320 if (( f = fopen( pidfn, "rt" ))) { in islocked()
321 if ( filesize( pidfn ) == 0 ) in islocked()
328 lunlink( pidfn ); in islocked()
336 int lockpid(const char *pidfn) in lockpid() argument
344 if ( islocked( pidfn )) in lockpid()
347 xstrcpy( tmpname, pidfn, MAX_PATH ); in lockpid()
367 rc = link( tmpname, pidfn ); in lockpid()
/dports/sysutils/nut-devel/nut-9e6a5ab2/server/
H A Dupsd.c125 static char pidfn[SMALLBUF]; variable
684 if (strlen(pidfn) > 0) { in upsd_cleanup()
685 unlink(pidfn); in upsd_cleanup()
1224 snprintf(pidfn, sizeof(pidfn), "%s/%s.pid", altpidpath(), progname); in main()
1285 cmdret = sendsignalfn(pidfn, cmd); in main()
1292 if (sendsignalfn(pidfn, 0) == 0) { in main()
1383 writepid(pidfn); in main()
1385 memset(pidfn, 0, sizeof(pidfn)); in main()
/dports/net-mgmt/xymon-server/xymon-4.3.30/xymond/
H A Dxymond_history.c77 char pidfn[PATH_MAX]; in main() local
81 MEMDEFINE(pidfn); in main()
89 sprintf(pidfn, "%s/xymond_history.pid", xgetenv("XYMONSERVERLOGS")); in main()
102 strcpy(pidfn, strchr(argv[argi], '=')+1); in main()
161 FILE *pidfd = fopen(pidfn, "w"); in main()
785 MEMUNDEFINE(pidfn); in main()
788 unlink(pidfn); in main()
/dports/net-mgmt/xymon-client/xymon-4.3.30/xymond/
H A Dxymond_history.c77 char pidfn[PATH_MAX]; in main() local
81 MEMDEFINE(pidfn); in main()
89 sprintf(pidfn, "%s/xymond_history.pid", xgetenv("XYMONSERVERLOGS")); in main()
102 strcpy(pidfn, strchr(argv[argi], '=')+1); in main()
161 FILE *pidfd = fopen(pidfn, "w"); in main()
785 MEMUNDEFINE(pidfn); in main()
788 unlink(pidfn); in main()
/dports/sysutils/nut/nut-2.7.4/common/
H A Dcommon.c233 int sendsignalfn(const char *pidfn, int sig) in sendsignalfn() argument
239 pidf = fopen(pidfn, "r"); in sendsignalfn()
241 upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn); in sendsignalfn()
246 upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); in sendsignalfn()
/dports/net-mgmt/xymon-server/xymon-4.3.30/common/
H A Dxymonlaunch.c495 char *pidfn = NULL; in main() local
529 pidfn = strdup(expand_env(p+1)); in main()
599 if (pidfn) { in main()
600 FILE *pidfd = fopen(pidfn, "w"); in main()
802 if (pidfn) unlink(pidfn); in main()
/dports/net-mgmt/xymon-client/xymon-4.3.30/common/
H A Dxymonlaunch.c495 char *pidfn = NULL; in main() local
529 pidfn = strdup(expand_env(p+1)); in main()
599 if (pidfn) { in main()
600 FILE *pidfd = fopen(pidfn, "w"); in main()
802 if (pidfn) unlink(pidfn); in main()
/dports/sysutils/nut-devel/nut-9e6a5ab2/common/
H A Dcommon.c264 int sendsignalfn(const char *pidfn, int sig) in sendsignalfn() argument
271 pidf = fopen(pidfn, "r"); in sendsignalfn()
273 upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn); in sendsignalfn()
278 upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); in sendsignalfn()

12