Hello every body,
How to know what task have run a perl script ?
I mean is possible to get within the code which process Id have start the
script.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
It is posible on unix like system ( must be possible on others too But I
dont know )
On my machine which happens to be linux I do
$Parent_id = `cat /proc/$$/status |grep PPid |awk '{print \$2}'`
chomp $Parent_id
If you want the process name too you will get it from /proc/$Parent_id/stat
But
It is posible on unix like system ( must be possible on others too But I
dont know )
On my machine which happens to be linux I do
$Parent_id = `cat /proc/$$/status |grep PPid |awk '{print \$2}'`
chomp $Parent_id
If you want the process name too you will get it from /proc/$Parent_id/stat
But
It is posible on unix like system ( must be possible on others too But I
dont know )
On my machine which happens to be linux I do
$Parent_id = `cat /proc/$$/status |grep PPid |awk '{print \$2}'`
chomp $Parent_id
If you want the process name too you will get it from /proc/$Parent_id/stat
But
Cedric Gross wrote:
>
> Hello every body,
Hello,
> How to know what task have run a perl script ?
> I mean is possible to get within the code which process Id have start the
> script.
perldoc -f getppid
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Thursday 21 November 2002 03:21 am, cedric gross wrote:
> Hello every body,
>
> How to know what task have run a perl script ?
> I mean is possible to get within the code which process Id have start the
> script.
If you're running Linux or Unix, perl holds your environment variables in a
hash;
On Nov 22, Chris Browning said:
>On Thursday 21 November 2002 03:21 am, cedric gross wrote:
>> Hello every body,
>>
>> How to know what task have run a perl script ?
>> I mean is possible to get within the code which process Id have start the
>> script.
>
>If you're running Linux or Unix, perl hol
Jeff japhy Pinyan said:
> On Nov 22, Chris Browning said:
>
>>On Thursday 21 November 2002 03:21 am, cedric gross wrote:
>>> Hello every body,
>>>
>>> How to know what task have run a perl script ?
>>> I mean is possible to get within the code which process Id have start
>>> the script.
>>
>>If yo