Opened 12 years ago

Closed 9 years ago

#4286 defect closed fixed (fixed)

Gtk2 and Glib2 reactor on Python 2.5 and earlier cause problems with interrupted syscalls

Reported by: Jean-Paul Calderone Owned by: Itamar Turner-Trauring
Priority: low Milestone:
Component: core Keywords:
Cc: Branch:


#733 fixed most of Twisted to play nicely with respect to signal handlers and interrupted syscalls, but failed to fix the problem for Gtk2 and Glib2 reactor.

This could be fixed by having these reactors explicitly select twisted.internet._sigchld as the way to handle SIGCHLD.

Change History (7)

comment:1 Changed 12 years ago by Glyph

I don't understand why the gtk2 and glib2 reactors have these problems. What is it that the gtk mainloop does differently? Does importing 'gtk' or 'gobject' install signal handlers?

comment:2 Changed 11 years ago by <automation>

Owner: Glyph deleted

comment:3 Changed 10 years ago by Itamar Turner-Trauring

This has become relevant to #5512, maybe. In addition to Glyph's question - what is the purpose of _GlibSignalMixin at all? It seems like it still sets a SIGCHLD handler *before* gtk would run its event loop, so if gtk.main would override it what's the point?

comment:4 Changed 9 years ago by Itamar Turner-Trauring

I re-encountered this in #5986. Looking at current glib code, it looks like we just stomp on any use by gtk/glib of the set_wakeup_fd. Maybe that's OK, inspection of the code suggests they only use it to detect Ctrl-C, and don't actually look at contents of the byte. So in so far as we manage shutdown, it's not a problem.

I therefore propose closing this as wontfix. Any disagreement?

comment:5 Changed 9 years ago by Itamar Turner-Trauring

Owner: set to Itamar Turner-Trauring

The relevant test passes just fine on the gtk2 and glib2 reactors, JP has no comment, Glyph is silent. I will close this as part of #5986, since I'll already be deleting skips in this test made irrelevant by #5986.

comment:6 Changed 9 years ago by Glyph

Well, we don't support python 2.5 anyway, right? So a fix would have to be a patch version, and it doesn't sound like anyone cares. So go ahead.

comment:7 Changed 9 years ago by itamarst

Resolution: fixed
Status: newclosed

(In [35835]) Merge signals-5986-3.

Author: itamar Review: exarkun Fixes: #5986, #4286

Port twisted.internet._signals to Python 3, dropping unnecessary pre-2.6 code along the way.

Note: See TracTickets for help on using tickets.