On 11 March 2013 14:58, Chow Loong Jin hyperair@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 :)
Cheers Lex
-- Kind regards, Loong Jin
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel