launch_uris() indeed inherits stdout/stderr to the child, which is usually what you want. But not in this case, when we exit the parent process before the child.
The launch_uris_as_manager() method gives more flexibility, in particular you can give custom GLib.SpawnFlags to it (launch_uris() just uses GLib.SpawnFlags.SEARCH_PATH). Unfortunately this is currently rather awkward to use from Python as it's missing some annotations: $ python -c "from gi.repository import GLib, Gio; Gio.DesktopAppInfo.new('gcalctool.desktop').launch_uris_as_manager([], None, GLib.SpawnFlags.STDOUT_TO_DEV_NULL, None, None, None, None)" | tee /tmp/foo Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: Argument 2 does not allow None as a value If I hack the annotations to add the missing allow-none's, it works fine: $ python -c "from gi.repository import GLib, Gio; Gio.DesktopAppInfo.new('gcalctool.desktop').launch_uris_as_manager([], None, GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.STDOUT_TO_DEV_NULL, None, None, None, None)" | tee /tmp/foo This now immediately returns. ** Also affects: glib2.0 (Ubuntu) Importance: Undecided Status: New ** Changed in: glib2.0 (Ubuntu) Importance: Undecided => Medium ** Changed in: glib2.0 (Ubuntu) Status: New => In Progress ** Changed in: glib2.0 (Ubuntu) Assignee: (unassigned) => Martin Pitt (pitti) ** Package changed: glib2.0 (Ubuntu) => glib ** Also affects: gobject-introspection (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to glib2.0 in Ubuntu. https://bugs.launchpad.net/bugs/1259721 Title: Executing autopilot test suite fails to close when piped to tee Status in Autopilot: Confirmed Status in The "G" Library - GLib: In Progress Status in “gobject-introspection” package in Ubuntu: In Progress Bug description: Executing "autopilot run autopilot | tee /tmp/autopilot.log" never closes on my trusty box. The autopilot process closes (according to "ps -ef") but the tee process stays open. It appears that tee is missing the EOF. I originally saw this on the CI autopilot runner: http://s-jenkins.ubuntu-ci:8080/job/autopilot-testrunner-otto-trusty/1390/console It appears I'm running an unreleased version: python-autopilot: Installed: 1.4+14.04.20131205.1-0ubuntu1 python-autopilot-tests: Installed: 1.4+14.04.20131206.1-0ubuntu1 Will try again with the archive version and update the report. To manage notifications about this bug go to: https://bugs.launchpad.net/autopilot/+bug/1259721/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp