on Wed, 30 Oct 2002 19:48:24 GMT, [EMAIL PROTECTED] (Guy
Davis) wrote:
> I am calling another perl script and it has failed occasionally
> from errors that I have not yet tracked down. What I want to do is
> grab and store the process id. Then check to see if that process
> id is still running at
Charlotte Oliver wrote:
>
> Additionally, if you're looking for a particular process, you could do:
>
> ps -aux | grep "processname"
>
> That will limit the output only to the particular thing you're looking
> for, but will show all instances of it.
Of course if you are on Linux you could do:
Hi -
Yes, I agree ps -aux.
To do it from perl, use bacticks:
#!c:\perl\bin\perl -w
use strict;
my @processes = `ps -aux`;
print "$_" for @processes;
@processes has _everything_ about your currently
running processes (depenging on your permission
level).
Aloha => Beau.
-Original Message
the system command does not return pids. it only returns error status
numbers(constants).
check perldoc -f system for more info.
your best bet is to fork another process (of the other perlscript your are
calling) .
for info see:
perldoc -f fork
perldoic perlipc
and you should find tons of recent
-
> From: Tucker, Ernie [mailto:ETucker@;chartercom.com]
> Sent: Wednesday, October 30, 2002 2:48 PM
> To: 'Guy Davis'; [EMAIL PROTECTED]
> Subject: RE: Grabbing a process ID
>
>
> ps -aux
>
> -Original Message-
> From: Guy Davis [mailto:guy@;yournaturewithi
ps -aux
-Original Message-
From: Guy Davis [mailto:guy@;yournaturewithin.com]
Sent: Wednesday, October 30, 2002 1:48 PM
To: [EMAIL PROTECTED]
Subject: Grabbing a process ID
If I'm using the system command on a linux box is there any way to get the
process id returned?
I am calling anoth