/dports/sysutils/ganglia-monitor-core/ganglia-3.7.2/lib/ |
H A D | update_pidfile.c | 20 update_pidfile (char *pidfile) in update_pidfile() argument 28 file = fopen (pidfile, "r"); in update_pidfile() 36 err_msg("daemon already running: %s pid %ld\n", pidfile, p); in update_pidfile() 50 unlink(pidfile); in update_pidfile() 52 file = fopen (pidfile, "w"); in update_pidfile() 56 pidfile, strerror (errno)); in update_pidfile()
|
/dports/devel/p5-File-Pid/File-Pid-1.01/ |
H A D | README | 7 my $pidfile = File::Pid->new({ 11 $pidfile->write; 13 if ( my $num = $pidfile->running ) { 17 $pidfile->remove; 25 my $pidfile = File::Pid->new; 43 "pid" - The pid to write to a new pidfile. If not specified, $$ is used 48 my $pidfile = $pidfile->file; 53 my $pid = $pidfile->pid; 58 my $pid = $pidfile->write; 64 my $pid = $pidfile->running; [all …]
|
/dports/databases/p5-Bucardo/Bucardo-5.6.0/t/ |
H A D | 98-cleanup.t | 21 my $pidfile = "$dir/postmaster.pid"; 22 if (-e $pidfile) { 23 open my $fh, '<', $pidfile or die qq{Could not open "$pidfile": $!\n}; 24 <$fh> =~ /^(\d+)/ or die qq{File "$pidfile" did not start with a number!\n}; 26 close $fh or die qq{Could not close "$pidfile": $!\n};
|
/dports/www/davix/davix-0.7.6/test/pywebdav/server/ |
H A D | daemonize.py | 48 pidfile=None, startmsg = 'started with pid %s' ): argument 88 if pidfile: file(pidfile,'w+').write("%s\n" % pid) 100 pidfile='pid.txt', startmsg = 'started with pid %s', action='start' ): argument 103 pf = file(pidfile,'r') 112 sys.stderr.write(mess % pidfile) 125 os.remove(pidfile) 137 sys.stderr.write(mess % pidfile) 140 deamonize(stdout,stderr,stdin,pidfile,startmsg)
|
/dports/net/kamailio/kamailio-5.4.5/pkg/kamailio/alpine/ |
H A D | kamailio.initd | 4 pidfile=/run/kamailio/kamailio.pid 16 start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ 20 -P $pidfile \ 27 start-stop-daemon --stop --quiet --pidfile $pidfile
|
/dports/devel/clixon/clixon-4.8.0/lib/src/ |
H A D | clixon_sig.c | 128 pidfile_get(char *pidfile, in pidfile_get() argument 136 if ((f = fopen (pidfile, "r")) != NULL){ in pidfile_get() 179 pidfile_write(char *pidfile) in pidfile_write() argument 185 if ((f = fopen(pidfile, "w")) == NULL){ in pidfile_write() 187 clicon_err(OE_DAEMON, errno, "Creating pid-file %s (Try run as root?)", pidfile); in pidfile_write() 189 clicon_err(OE_DAEMON, errno, "Creating pid-file %s", pidfile); in pidfile_write() 193 clicon_err(OE_DAEMON, errno, "Could not write pid to %s", pidfile); in pidfile_write() 196 clicon_debug(1, "Opened pidfile %s with pid %d", pidfile, getpid()); in pidfile_write()
|
/dports/net/p5-Server-Starter/Server-Starter-0.34/t/ |
H A D | 12-stop.t | 12 my $pidfile = "$dir/pid"; 19 pid_file => $pidfile, 29 while (!-s $pidfile) { 35 open my $fh, '<', $pidfile 36 or die "Cannot open $pidfile: $!"; 44 pid_file => $pidfile, 47 ok((!-e $pidfile), 'pid file was unlinked');
|
/dports/sysutils/munin-contrib/contrib-c31cb28/plugins/cpu/ |
H A D | multicpu1sec | 14 pidfile="$MUNIN_PLUGSTATE/munin.$plugin.pid" 21 kill -0 $(cat $pidfile) 2> /dev/null || rm -f $pidfile 26 echo "$$" > $pidfile 29 rm -f $pidfile $cache 34 if [ -f $pidfile ]; then 35 touch $pidfile
|
/dports/sysutils/pv/pv-1.6.20/src/main/ |
H A D | main.c | 83 if (opts->pidfile != NULL) { in main() 85 pidfptr = fopen(opts->pidfile, "w"); in main() 88 opts->pidfile, strerror(errno)); in main() 96 opts->pidfile, strerror(errno)); in main() 266 if (opts->pidfile != NULL) { in main() 267 if (0 != remove(opts->pidfile)) { in main() 270 opts->pidfile, in main() 282 if (opts->pidfile != NULL) { in main() 286 opts->pidfile, in main() 300 if (opts->pidfile != NULL) { in main() [all …]
|
/dports/java/avis/avis-1.2.0/server/bin/ |
H A D | avisd | 40 -pidfile) pidfile=$2; shift 2;; 62 if [ "x$pidfile" != "x" ]; then echo $! > "$pidfile"; fi 64 if [ "x$pidfile" != "x" ]; then echo $$ > "$pidfile"; fi
|
/dports/net-im/prosody/prosody-0.11.13/plugins/ |
H A D | mod_posix.lua | 70 local pidfile; 76 os.remove(pidfile); 77 pidfile, pidfile_handle = nil, nil; 85 pidfile = module:get_option_path("pidfile", nil, "data"); 86 if pidfile then 88 local mode = stat(pidfile) and "r+" or "w+"; 89 pidfile_handle, err = io.open(pidfile, mode); 91 module:log("error", "Couldn't write pidfile at %s; %s", pidfile, err); 101 pidfile_handle, err = io.open(pidfile, "w+"); 103 module:log("error", "Couldn't write pidfile at %s; %s", pidfile, err);
|
/dports/mail/imapsync/imapsync-1d08afa/W/patches/ |
H A D | imapsync_Cvitkovich_pidfile_tmpfile | 487 unlink($pidfile) if ($pidfile and -f $pidfile); 510 unlink($pidfile) if ($pidfile and -f $pidfile); 622 unlink($pidfile) if ($pidfile and -f $pidfile); 678 unlink($pidfile) if ($pidfile and -f $pidfile); 684 unlink($pidfile) if ($pidfile and -f $pidfile); 717 unlink($pidfile) if ($pidfile and -f $pidfile); 722 unlink($pidfile) if ($pidfile and -f $pidfile); 1307 unlink($pidfile) if ($pidfile and -f $pidfile); 1513 unlink($pidfile) if ($pidfile and -f $pidfile); 1527 unlink($pidfile) if ($pidfile and -f $pidfile); [all …]
|
/dports/net/sems/sems-f89581a/pkg/rpm/ |
H A D | sems.init | 27 pidfile=/var/run/$prog/$prog.pid 60 if pidofproc -p $pidfile > /dev/null 2>&1 ; then 65 daemon $sems -P $pidfile -u sems -g sems -f $conffile $OPTIONS 84 if ! pidofproc -p $pidfile > /dev/null 2>&1 ; then 89 killproc -p $pidfile 2> /dev/null 92 [ $RETVAL = 0 ] && rm -f $lockfile $pidfile 121 if [ -f $pidfile ] ; then
|
/dports/audio/ices/ices-2.0.3/src/ |
H A D | ices.c | 127 if (ices_config->pidfile != NULL) in main() 129 FILE *f = fopen (ices_config->pidfile, "w"); in main() 137 LOG_WARN1("pidfile \"%s\" cannot be written to", ices_config->pidfile); in main() 138 xmlFree (ices_config->pidfile); in main() 139 ices_config->pidfile = NULL; in main() 146 if (ices_config->pidfile) in main() 147 remove (ices_config->pidfile); in main()
|
/dports/dns/p5-Net-DNSBL-MultiDaemon/Net-DNSBL-MultiDaemon-0.39/ |
H A D | rc.multi_dnsbl | 98 my ($DNSBL,%STATS,$StatStamp,$pidfile,$RUN,$pid); 124 $pidfile = $DNSBL->{MDpidpath} .'/'. $me . '.pid'; 127 if ( -e $pidfile && 128 -r $pidfile && 129 open(PID,$pidfile)) { 169 open(PID,'>'.$pidfile) 170 or usage("could not open $pidfile"); 205 unlink $pidfile if $pidfile;
|
/dports/net/syncthing/syncthing-1.18.1/syncthing/etc/freebsd-rc/ |
H A D | syncthing | 40 pidfile=/var/run/syncthing.pid 46 touch ${pidfile} && chown ${syncthing_user} ${pidfile} 48 …/usr/sbin/daemon -cf -p ${pidfile} -u ${syncthing_user} ${command} ${syncthing_cmd} ${syncthing_fl… 52 [ -f ${pidfile} ] && rm ${pidfile}
|
/dports/comms/ncid/ncid/gateway/ |
H A D | rn2ncid.pl | 70 my $pidfile = ""; 107 "pidfile|p=s" => \$pidfile 355 if ($pidfile ne "") { 356 if (-e $pidfile) { 358 unless (open(PIDFILE, $pidfile)) { 371 logMsg(1, "Found stale pidfile: $pidfile\n"); 378 logMsg(1, "Found stale pidfile: $pidfile\n"); 385 if (open(PIDFILE, ">$pidfile")) { 389 logMsg(1, "Wrote pid $pid in $pidfile\n"); 411 unlink($pidfile); [all …]
|
/dports/comms/gammu/gammu-1.42.0/contrib/init/ |
H A D | gammu-smsd.rh | 22 pidfile=${PIDFILE-/var/run/gammu-smsd.pid} 27 dir=$(dirname ${pidfile}) 29 $prog -c $config -p ${pidfile} -d 38 killproc -p ${pidfile} php-fpm 42 rm -f ${lockfile} ${pidfile} 60 status -p ${pidfile} gammu-smsd
|
/dports/security/stunnel/stunnel-5.60/src/ |
H A D | ui_unix.c | 196 if(!global_options.pidfile) { in create_pid() 202 unlink(global_options.pidfile); in create_pid() 205 pf=open(global_options.pidfile, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644); in create_pid() 207 s_log(LOG_ERR, "Cannot create pid file %s", global_options.pidfile); in create_pid() 213 s_log(LOG_ERR, "Cannot write pid file %s", global_options.pidfile); in create_pid() 219 s_log(LOG_DEBUG, "Created pid file %s", global_options.pidfile); in create_pid() 224 if(global_options.pidfile) { in delete_pid() 225 if(unlink(global_options.pidfile)<0) in delete_pid() 226 ioerror(global_options.pidfile); /* not critical */ in delete_pid() 228 s_log(LOG_DEBUG, "Removed pid file %s", global_options.pidfile); in delete_pid()
|
/dports/www/ufdbguard/ufdbGuard-1.35.3/src/mtserver/ |
H A D | ufdbsignal.c | 185 const char * pidfile; in doCommand() local 205 pidfile = UFDBHTTPD_PID_FILE; /* TODO: make the piddir a command line option */ in doCommand() 207 pidfile = UFDBGUARDD_PID_FILE; in doCommand() 209 pidfile = UFDBICAP_PID_FILE; in doCommand() 216 pid = readpidfromfile( pidfile ); in doCommand() 221 …dbLogError( "failed sending signal to %s since the pid could not be read from %s", arg1, pidfile ); in doCommand() 222 (void) unlink( pidfile ); in doCommand() 234 … fprintf( stderr, "ufdbsignal: process %d does not exist; removing pid file %s\n", pid, pidfile ); in doCommand() 235 … ufdbLogMessage( "ufdbsignal: process %d does not exist; removing pid file %s\n", pid, pidfile ); in doCommand() 236 (void) unlink( pidfile ); in doCommand()
|
/dports/net-im/jggtrans/jggtrans-2.2.6/src/ |
H A D | main.c | 325 if (pidfile){ in daemonize() 327 fclose(pidfile); in daemonize() 390 FILE *pidfile; in main() local 525 else pidfile=NULL; in main() 526 if (pidfile){ in main() 531 fclose(pidfile); in main() 543 if (pidfile==NULL) in main() 547 pidfile=NULL; in main() 558 if (pidfile) fchown(fileno(pidfile),pwd->pw_uid,newgid); in main() 568 fclose(pidfile); in main() [all …]
|
/dports/sysutils/cmogstored/cmogstored-1.8.1/ |
H A D | cfg_validate.c | 43 if (cli->pidfile && ent->pidfile) in validate_merge_common() 44 paths_eql_or_die("pidfile", cli->pidfile, ent->pidfile, in validate_merge_common() 46 merge_str(&cli->pidfile, ent->pidfile); in validate_merge_common() 100 if (ent->pidfile && ent->pidfile[0] != '/') in mog_cfg_validate_daemon() 101 warn_daemonize(nerr, "pidfile", ent->pidfile); in mog_cfg_validate_daemon()
|
/dports/www/kannel/gateway-1.4.4/utils/ |
H A D | kannel-init.d | 36 …$SSD --start --quiet --pidfile $PIDFILES/kannel_bearerbox.pid --exec $RB -- --pidfile $PIDFILES/ka… 38 …$SSD --start --quiet --pidfile $PIDFILES/kannel_wapbox.pid --exec $RB -- --pidfile $PIDFILES/kanne… 40 # $SSD --start --quiet --pidfile $PIDFILES/kannel_smsbox.pid --exec $RB -- --pidfile $PIDFILES/k… 46 $SSD --stop --quiet --pidfile $PIDFILES/kannel_wapbox.pid --exec $RB 48 # $SSD --stop --quiet --pidfile $PIDFILES/kannel_smsbox.pid --exec $RB 50 $SSD --stop --quiet --pidfile $PIDFILES/kannel_bearerbox.pid --exec $RB
|
/dports/devel/py-circuits/circuits-3.2/tests/core/ |
H A D | signalapp.py | 21 def init(self, pidfile, signalfile): argument 22 self.pidfile = pidfile 25 Daemon(self.pidfile).register(self) 39 pidfile = os.path.abspath(sys.argv[1]) 41 App(pidfile, signalfile).run()
|
/dports/math/vtk6/VTK-6.2.0/ThirdParty/Twisted/twisted/scripts/ |
H A D | _twistd_unix.py | 70 def checkPID(pidfile): argument 71 if not pidfile: 73 if os.path.exists(pidfile): 75 pid = int(open(pidfile).read()) 84 os.remove(pidfile) 87 (pid, pidfile, why[1])) 212 def removePID(self, pidfile): argument 220 if not pidfile: 223 os.unlink(pidfile) 269 if pidfile: [all …]
|