[Geany-Devel] spawn_kill_process TERM or KILL?

Lex Trotman elextr at xxxxx
Tue Sep 22 22:42:17 UTC 2015


On 23 September 2015 at 00:35, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> Hi, all,
>
> Should spawn_kill_process send a SIGTERM or SIGKILL to the child under *nix?
>
> - SIGTERM lets the child exit gracefully, removing temporary files etc.

This says it all, blasting a process and possibly leaving the build
system in an unknown state is a "bad thing" (tm).

Also consider the effect when there is more than one spawned process
in the build, you may not kill them all, leave zombies, not clean up
backend build servers etc.  The build should be politely given the
chance to clean up, since it might be designed to do so, we don't
know.


>
> - the original build.c:kill_process from Geany <= 1.24 sends SIGTERM

Yes, this has been discussed before, but I can't remember where.


>
> - the child may refuse to terminate on SIGTERM (or be unable to respond to
> it because of blocking I/O)
>
> - under Windows, TerminateProcess() is an equivalent of SIGKILL, not SIGTERM

Does Windows have a sigterm equivalent?  We should not make Linux
worse to match Windows.

>
> - the API name is "kill", not terminate.

Its too late to change it now if its in the API.

>
> --
> E-gards: Jimmy
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel


More information about the Devel mailing list