diff --git a/xpra/client/mixins/window_manager.py b/xpra/client/mixins/window_manager.py index 9a16f7f5dd..030113b5fd 100644 --- a/xpra/client/mixins/window_manager.py +++ b/xpra/client/mixins/window_manager.py @@ -975,7 +975,7 @@ def watcher_terminated(*args): log("using watcher pid=%i for server pid=%i", proc.pid, pid) self._pid_to_signalwatcher[pid] = proc proc.stdout_io_watch = GLib.io_add_watch(proc.stdout, - GLib.PRIORITY_DEFAULT, GLib.IO_IN, + GLib.PRIORITY_DEFAULT, GLib.IO_IN | GLib.IO_HUP | GLib.IO_ERR, self.signal_watcher_event, proc, pid, wid) if proc: self._signalwatcher_to_wids.setdefault(proc, []).append(wid) @@ -984,8 +984,8 @@ def watcher_terminated(*args): def signal_watcher_event(self, fd, cb_condition, proc, pid:int, wid:int) -> bool: log("signal_watcher_event%s", (fd, cb_condition, proc, pid, wid)) - if cb_condition==GLib.IO_HUP: - proc.stdout_io_watch = None + if cb_condition in (GLib.IO_HUP, GLib.IO_ERR): + kill_signalwatcher(proc) return False if proc.stdout_io_watch is None: #no longer watched