httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: [patch mod_example.c] print pid, ppid and tid
Date Thu, 16 Oct 2003 00:40:03 GMT
On Wed, 15 Oct 2003, Stas Bekman wrote:

> +#if APR_HAVE_UNISTD_H
> +/* for getpid() */
> +#include <unistd.h>
> +#endif
> +    ap_rprintf(r, "<P>Process ID: %lu, Parent Process ID: %lu",
> +               (unsigned long)getpid(), (unsigned long)getppid());
> +#if APR_HAS_THREADS
> +    ap_rprintf(r, ", Thread ID: %lu", (unsigned long)apr_os_thread_current());
> +#endif

Is there no truly portable way to do this?

--Cliff

Mime
View raw message