Starter of a script

2002-11-21 Thread cedric gross
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]

Re: Starter of a script

2002-11-21 Thread Ramprasad A Padmanabhan
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

Re: Starter of a script

2002-11-21 Thread Ramprasad A Padmanabhan
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

Re: Starter of a script

2002-11-21 Thread Ramprasad A Padmanabhan
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

Re: Starter of a script

2002-11-21 Thread John W. Krahn
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

Re: Starter of a script

2002-11-22 Thread Chris Browning
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;

Re: Starter of a script

2002-11-22 Thread Jeff 'japhy' Pinyan
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

Re: Starter of a script

2002-11-22 Thread Paul Johnson
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