apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: How to get the PID?
Date Tue, 18 Feb 2003 17:44:58 GMT
--On Tuesday, February 18, 2003 10:13 AM +0100 Damir Dezeljin 
<programing@mbss.org> wrote:

> Is there a way to get a PID of the current process? I checked the
> docs, however I didn't find a function that fit my needs (hehe ...
> maybe I missed something ;) ).

You can call getpid().  I believe that's fairly portable.  You can do:

apr_os_proc_t pid = getpid();

If getpid() isn't really portable, we could add wrappers.  Patches 
welcomed.  -- justin

Mime
View raw message