Picking up this old discussion:

On 03.07.2011 19:40, William A. Rowe Jr. wrote:
On 7/1/2011 12:26 AM, Mladen Turk wrote:
On 07/01/2011 06:31 AM, Gregg L. Smith wrote:
Hi folks,

Well, this is the same chunk of Win32 specific debugging code causing this 
module to
crash yet again.

Gregg: Can you tell us, in which line it is crashing?

Getting the parent pid means we we are in the child process, so we must not
init the parent watchdog thread (see 'return OK;')

That's not how to detect it, you break -X mode.

Not sure, he wants to detect the parent. A quick look through the winnt MPM shows the env var is generated in

static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_event, DWORD *child_pid)

so I guess it is not set when run in -X mode, which would lead to the correct result.

There is an ap_mpm_query to determine if this is the child.

I had a short look at the MPM queries and didn't find an obvious fit. Are you talking about AP_MPMQ_GENERATION or which query do you mean?

I guess one could also check "parent_pid == my_pid" but as noted above the real crash might happen somewhere else. It would be nice if Gregg could provide further detail.

Regards,

Rainer

Reply via email to