Subject: bug#15983: 24.3; Emacs Not Killing Child Process

From: Eli Zaretskii <[email-masked]>
Date: Sun, 22 Dec 2013 05:53:18 +0200

> Date: Sun, 22 Dec 2013 04:03:12 +0200
> From: Joan Karadimov <[email-masked]>
> Cc: [email-masked], Simon Morgan <[email-masked]>, 
> 	Bozhidar Batsov <[email-masked]>
> 
> > > I am aware that 'taskkill' is not present on windowses (is that a word?)
> > > older than XP. This makes it no worse than 'CreateToolhelp32Snapshot'.
> >
> > No, the toolhelp functions are available on Windows 2000 and even on
> > Windows 98.  They are unavailable only on NT 4.0.
> >
> MSDN states that the "Minimum supported client" is XP.

MSDN lies.  They do that in a lot of API functions, to pretend that
older versions don't exist (because their support has ended).

> I guess 2000 is counted with the server ones

No, it's not.

> and 9x is not even considered.

Right.

> > > > This might be "good enough" -- we err on the safe side, and only leave
> > > > some subprocesses not killed in rare situations.  Does this strategy
> > > > solve the problem which started this bug report?
> >
> > You didn't answer that question, but I assume the answer is YES.
> >
> It should fix the problem, yes.

Well, I'd prefer a test, to be sure.

> > I think it would be better to also require that process-start-time is
> > before the time kill-process-tree is called.  This might miss some
> > children, if they happen to be spawned right after the call, but it is
> > safer.
> >
> This should already be reflected in the requirement that all processes that
> are killed were already in the initial-process-tree (the first snapshot).

They could have been started before that.  E.g., imagine that one of
the children exited or died on its own, and its PID was reused, before
kill-process was called.

> I'll start working on some code that I can show, then.

Thank you.

Btw, if the patch is going to be substantial, we will need legal
paperwork from you, before we can accept the code.