=== modified file 'mandos' --- mandos 2019-08-24 14:52:59 +0000 +++ mandos 2019-08-24 15:20:41 +0000 @@ -1150,7 +1150,8 @@ kwargs=popen_args) self.checker.start() self.checker_callback_tag = GLib.io_add_watch( - pipe[0].fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, + GLib.IOChannel.unix_new(pipe[0].fileno()), + GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.checker_callback, pipe[0], command) # Re-run this periodically if run by GLib.timeout_add return True @@ -2680,8 +2681,8 @@ def add_pipe(self, parent_pipe, proc): # Call "handle_ipc" for both data and EOF events GLib.io_add_watch( - parent_pipe.fileno(), GLib.PRIORITY_DEFAULT, - GLib.IO_IN | GLib.IO_HUP, + GLib.IOChannel.unix_new(parent_pipe.fileno()), + GLib.PRIORITY_DEFAULT, GLib.IO_IN | GLib.IO_HUP, functools.partial(self.handle_ipc, parent_pipe=parent_pipe, proc=proc)) @@ -2725,8 +2726,8 @@ return False GLib.io_add_watch( - parent_pipe.fileno(), GLib.PRIORITY_DEFAULT, - GLib.IO_IN | GLib.IO_HUP, + GLib.IOChannel.unix_new(parent_pipe.fileno()), + GLib.PRIORITY_DEFAULT, GLib.IO_IN | GLib.IO_HUP, functools.partial(self.handle_ipc, parent_pipe=parent_pipe, proc=proc, @@ -3602,11 +3603,11 @@ sys.exit(1) # End of Avahi example code - GLib.io_add_watch(tcp_server.fileno(), GLib.PRIORITY_DEFAULT, - GLib.IO_IN, - lambda *args, **kwargs: - (tcp_server.handle_request - (*args[2:], **kwargs) or True)) + GLib.io_add_watch( + GLib.IOChannel.unix_new(tcp_server.fileno()), + GLib.PRIORITY_DEFAULT, GLib.IO_IN, + lambda *args, **kwargs: (tcp_server.handle_request + (*args[2:], **kwargs) or True)) logger.debug("Starting main loop") main_loop.run()