[Geany-devel] Signal Handling

Lex Trotman elextr at xxxxx
Tue Sep 11 01:47:14 UTC 2012


On 11 September 2012 03:15, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> On Sun, 09 Sep 2012 19:41:19 -0700
> Matthew Brush <mbrush at codebrainz.ca> wrote:
>
>> On 12-09-09 05:23 PM, Lex Trotman wrote:
>> > [...]
>> > So can anyone describe a useful use-case for catching SIGTERM and
>> > potentially refusing to exit?  And also for SIGINT.
>> >
>
> From what I see, signal_cb (used currently for SIGTERM only) looks like
> a naive attempt to replace the session management. That will never work,
> of course - either the WM will send a SIGKILL quickly (in 1-2 seconds),
> or the entire X will terminate, killing Geany.

Thats my thoughts too, just wanting to see if anyone has any further info on it.

>
> BTW, I'm happy to inform all Xfce users here that it's session
> management was fixed and pushed to git, so we may expect it with the
> next xfce-session versions. Using the "Action Buttons" plugin with
> Shutdown or Restart will still not work, but that's a different bug. Or
> maybe a feature, because the session settings specifically include the
> text "... on logout".

Sorry I've changed DEs again :)

>
>> For SIGINT, if it's handled, it'll ask if you want to save unsaved
>> documents before closing when Ctrl+C is used from the terminal. Not
>> saying whether we should handle it or not, just that it's why my tests
>> included it.
>
> My whole X terminates if I run it from a virtual console and press
> Ctrl+C, so why should Geany handle the signal? Is this a normal
> practice for the GUI programs under X than I'm not aware of?
>
> And of course, the portability of signal(2) is so bad that only SIG_DFL
> and SIG_IGN can be trusted.

Which is why it should only be "handled" via the mainloop, but as you
say its very questionable if we want to do any handling of either of
these signals anyway.

Lets see if a reason emerges.

Cheers
Lex

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



More information about the Devel mailing list