Lines Matching refs:pid

40     my $pid = 0;
43 $pid = 0 + <PIDFH>;
45 $pid = 0 unless($pid > 0);
47 return $pid;
57 my $pid = $_[0];
59 if($pid > 0) {
61 if(kill(0, $pid)) {
62 return $pid;
67 my $filter = "PID eq $pid";
69 if(index($result, "$pid") != -1) {
70 return -$pid;
82 my $pid = $_[0];
84 if($pid > 0) {
86 kill("TERM", $pid);
90 my $filter = "PID eq $pid";
92 if(index($result, "$pid") != -1) {
103 my $pid = $_[0];
105 if($pid > 0) {
107 kill("KILL", $pid);
111 my $filter = "PID eq $pid";
113 if(index($result, "$pid") != -1) {
116 system("tskill $pid >nul 2>&1");
135 my $pid = pidfromfile($pidfile);
137 if($pid > 0) {
139 if(pidexists($pid)) {
140 return $pid;
144 unlink($pidfile) if($pid == pidfromfile($pidfile));
146 waitpid($pid, &WNOHANG);
148 return -$pid;
184 my $pid = $1;
185 if($pid > 0) {
186 if(pidexists($pid)) {
187 print("RUN: Process with pid $pid signalled to die\n")
189 pidterm($pid);
190 push @signalled, $pid;
193 print("RUN: Process with pid $pid already dead\n")
196 waitpid($pid, &WNOHANG);
197 push @reapchild, $pid;
208 my $pid = $signalled[$i];
209 if(!pidexists($pid)) {
210 print("RUN: Process with pid $pid gracefully died\n")
214 waitpid($pid, &WNOHANG);
215 push @reapchild, $pid;
225 foreach my $pid (@signalled) {
226 if($pid > 0) {
227 print("RUN: Process with pid $pid forced to die with SIGKILL\n")
229 pidkill($pid);
231 waitpid($pid, &WNOHANG);
232 push @reapchild, $pid;
239 foreach my $pid (@reapchild) {
240 if($pid > 0) {
241 waitpid($pid, 0);
254 my $pid;
265 $pid = processexists($pidfile);
266 if($pid > 0) {
268 ($proto eq 'ftp')?'ctrl':'filt', $pid) if($verbose);
269 pidkill($pid);
270 waitpid($pid, 0);
279 $pid = processexists($pidfile);
280 if($pid > 0) {
282 $pid) if($verbose);
283 pidkill($pid);
284 waitpid($pid, 0);