[Geany-Devel] Changing terminate signal for stopping executing programs

Lex Trotman elextr at xxxxx
Mon Mar 11 02:18:10 UTC 2013

Hi All,

Geany currently uses SIGQUIT to terminate a running program (using the
execute menu item or toolbar button when it shows the stop icon).
This has always been the case since the stop button was added.

There is a big comment in the code explaining why SIGQUIT is used, and
its problems:

	/* Unix: SIGQUIT is not the best signal to use because it causes a
core dump (this should not
	 * perforce necessary for just killing a process). But we must use a
signal which we can
	 * ignore because the main process get it too, it is declared to
ignore in main.c. */

Another problem reported
and confirmed by Matthew is that it doesn't work!

For xfce4-terminal and gnome-terminal at least, xterm is ok!

My understanding of Unix/Linux signals is that the comment above is
wrong and always has been wrong, a signal sent to a child process by a
parent process does not get delivered to the parent.

I don't know if anybodys memory is good enough to remember why the
comment was thought to be correct (it was 2006 when it was committed).

For me simply using SIGTERM instead of SIGQUIT works fine, but does
anybody have any more insight, since we don't want to have Geany stop
unexpectedly when a user stops their running program.

Otherwise I'll change it in a few days.


More information about the Devel mailing list