[Geany-Devel] Changing terminate signal for stopping executing programs
elextr at xxxxx
Mon Mar 11 04:17:52 UTC 2013
On 11 March 2013 14:58, Chow Loong Jin <hyperair at gmail.com> wrote:
> On 11/03/2013 10:18, Lex Trotman wrote:
>> Hi All,
>> 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).
> Perhaps it was a misunderstanding -- signals sent to the parent will hit the
> child process, but not the other way around. (If it did, kill %1 in your shell
> would kill your shell as well.)
>> 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.
> How about SIGINT, and failing which, notifying the user that the program refuses
> to stop, and allowing for SIGTERM or SIGKILL?
Well, sigterm is the canonical terminate signal (it is called
SIG**TERM** after all :).
Some programs catch SIGTERM so they can terminate nicely like closing
files properly, so its a good idea to use it.
One day someone will re-write Geany's terminate handler to be legal
and Geany will do the same :)
> Kind regards,
> Loong Jin
> Devel mailing list
> Devel at lists.geany.org
More information about the Devel