Subject: bug#13086: 24.2.50; Emacs seems to hang at w32proc.c:1126

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Dec 2012 20:41:30 +0200

> Date: Wed, 05 Dec 2012 23:35:55 -0800
> From: Paul Eggert <[email-masked]>
> CC: [email-masked], [email-masked]
> 
> I found a race condition in delete-process that
> looks like it might be relevant, and installed
> a patch as trunk bzr 111122.  Could you please
> give that a try?

I also found some potential problem in w32proc.c, and fixed that in
revision 111132 on the trunk.  Stephen, please try the latest code and
see if the problem persists.

> If it doesn't fix the problem,
> it might help to see whether the problem is related
> to delete-process.  E.g., you might plant a breakpoint
> on Fdelete_process and see what sort of calls are
> being made to it.  Another possibility is to put
> a breakpoint on waitpid, to see what arguments are
> being passed to it and what it returns -- maybe
> you can insert some code to print out that info
> to a file.

Yes, if Emacs still loops where it did in your original report, please
tell what does waitpid set errno to, and through which 'return' line
does it return to its caller.

I find DebPrint useful for this -- is fast and causes GDB to display a
string when you run Emacs under GDB.  You will see examples of its
usage in w32proc.c and elsewhere.

Thanks.