Re(2): How to get UNIX Process ID from within a running 4GL program
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
From: "Mario R. Canto" <mcanto@intec.unl.edu.ar>
>
> > From: "Tim Lim" <tim_lim@exe.com.au>
> > >
> > >I have a need of get the UNIX process ID of my running 4GL program.
> > >
> > >Anyone has a known answer?
>
>The best way (that I know) without using a C function includded in the
>runner, is:
>
>$ fglgo myprog.4gi $$ # (passing the process Id as first argument)
Hang on, won't this just give you the PID of the shell that ran the 4GL?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
*From:* "Obnoxio The Clown" <obnoxio@hotmail.com>
>>
>>$ fglgo myprog.4gi $$ # (passing the process Id as first argument)>
>Hang on, won't this just give you the PID of the shell that ran the 4GL?
Yes, cos at the time the processing ID you really want doesn't exist 'cos
the process hasn't started. If you want the process id you must at least
let the code start:-))
Paul Watson # I don't suffer from
WF Software Ltd. # stress, I'm just
Tel. (+44) 1436 674729 # a carrier
Fax. (+44) 1436 678693 #
www.wfsoftware.com
Paul Watson <paulw@wfsoftware.co.uk> wrote:
> *From:* "Obnoxio The Clown" <obnoxio@hotmail.com>
>>>
>>>$ fglgo myprog.4gi $$ # (passing the process Id as first argument)>>
>>Hang on, won't this just give you the PID of the shell that ran the 4GL?
>
> Yes, cos at the time the processing ID you really want doesn't exist 'cos
> the process hasn't started. If you want the process id you must at least
> let the code start:-))
>
One could of course do:
exec fglgo myprog.4gi $$
under the majority of shells...
/J\\
--
"The Spice Girls don't care if I like them or not because I'm not twelve"
- Germaine Greer