Is there a way of getting the process ID of an appserver agent that is not connected to a DB?
At the moment I use:
def buffer connection for _myConnection.
find first connection no-lock no-error.
mypid = if avail connection
(Which doesn't work for agents with no DB)
I was hoping there would be a nice and easy session:pid attribute, but there doesn't appear to be one.
There is an old thread related to this: http://communities.progress.com/pcom/message/114675#114675.
You can use the getpid() function in libc.so to get the PID:
procedure getpid external 'libc.so' cdecl.
define return parameter pid as long no-undo.
def var p as int no-undo.
run getpid (output p).
I hope this helps.
Yep does the trick.