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
then string(connection._MyConn-Pid)
else ""
(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.
Chris
10.2B05
Solaris 10
Hello,
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.
end.
def var p as int no-undo.
run getpid (output p).
message p.
I hope this helps.
Yep does the trick.
Thanks...