Consultor Eletrônico



Kbase P7027: How to obtain the (PID) of a 64 bit progress client.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   06/10/2009
Status: Verified

GOAL:

How to obtain the process ID (PID) of a 4GL client

FACT(s) (Environment):

HP-UX 11 64-bit
IBM AIX
Progress 9.1C 64 bit
Progress 9.1D 64 bit
OpenEdge 10.x

FIX:

There are various types of 4GL clients, for example:

- 4GL client TTY mode
- 4GL client batch mode
- 4GL client running as a WebSpeed agent
- 4GL client running as an AppServer server process

Sometimes, you might need, for logging or debugging purposes, to get the PID of the 4GL client that executes a particular program.

For further information on the getpid function or on other UNIX functions, refer to your UNIX documentation.

The code is as follows:

DEFINE VARIABLE ppid AS INTEGER NO-UNDO.

PROCEDURE getpid EXTERNAL "usr/lib/pa20_64/libc.2" CDECL:
DEFINE RETURN PARAMETER ppid AS LONG NO-UNDO.
END PROCEDURE.

RUN getpid(OUTPUT ppid).

MESSAGE ppid.