Opened 4 years ago

Closed 23 months ago

#4286 defect closed fixed (fixed)

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

Reported by: exarkun Owned by: itamar
Priority: low Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

#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 4 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 4 years ago by <automation>

  • Owner glyph deleted

comment:3 Changed 2 years ago by itamar

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 2 years ago by itamar

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.

http://git.gnome.org/browse/pygtk/tree/gtk/gtk.override?id=PYGTK_2_24_0#n1146

I therefore propose closing this as wontfix. Any disagreement?

comment:5 Changed 2 years ago by itamar

  • Owner set to itamar

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 2 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 23 months ago by itamarst

  • Resolution set to fixed
  • Status changed from new to closed

(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.