Returning the PID of the current process

Author: (awiddowson)

Hi all,

Anyone know of a way for a userver to return it's own process id. We could call out to 3gl which returns the value but I wondered if there was a simpler way???





  1. ... but isn't using a 3gl callout an easy way to use functions not directly implmented in uniface?


    Success, Uli

    Author: ulrich-merkel (
  2. Hi

    No, no native Uniface way to o that, but a 3gl activate will do, and it's easy : just use the getpid() POSIX function (_getpid() on Windows, as Microsoft says, it's not standard ANSI...). You can use the same library to keep low level related things together, and then activate such a signature :

    numeric vPid

    activate "SYSFUNCS".getpid(vPid)


    Author: richard.gill (