Merge lp:~pitti/autopilot/launch-uri-stdout into lp:autopilot

Proposed by Martin Pitt
Status: Merged
Approved by: Thomi Richards
Approved revision: 398
Merged at revision: 399
Proposed branch: lp:~pitti/autopilot/launch-uri-stdout
Merge into: lp:autopilot
Diff against target: 41 lines (+9/-4)
2 files modified
autopilot/process/_bamf.py (+7/-2)
debian/control (+2/-2)
To merge this branch: bzr merge lp:~pitti/autopilot/launch-uri-stdout
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+198577@code.launchpad.net

Commit message

Don't inherit our stdout to spawned processes, to allow users to redirect
autopilot's stdout to tee and other programs which wait for EOF.

Description of the change

Don't inherit our stdout to spawned processes, to allow users to redirect
autopilot's stdout to tee and other programs which wait for EOF and not cause
hangs. See bug for details.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Please consider https://bugs.launchpad.net/autopilot/+bug/1259721/comments/8 when reviewing this, this is a design decision which we have to make.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Pitti,

I've merged your other MP, because it seems like the correct thing to do. However, we also want this one I think (we don't care about stdout in this case, and it clutters the test output). However, your other MP said they were mutually exclusive: I can't see why that should be though. Can't we have both?

Cheers,

review: Needs Fixing
Revision history for this message
Martin Pitt (pitti) wrote :

Well, they don't conflict technically of course, but my thought was that if we would merge this we wouldn't need to merge the remmina fix as that would then serve to make sure that this case of leaked processes is being handled gracefully. So "mutually exclusive" was too strong indeed.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/process/_bamf.py'
2--- autopilot/process/_bamf.py 2013-12-09 16:33:31 +0000
3+++ autopilot/process/_bamf.py 2013-12-11 15:02:46 +0000
4@@ -327,8 +327,13 @@
5 if type(files) is not list:
6 raise TypeError("files must be a list.")
7 proc = Gio.DesktopAppInfo.new(desktop_file)
8- # FIXME: second item is a GEerror
9- proc.launch_uris(files, None)
10+ # simple launch_uris() uses GLib.SpawnFlags.SEARCH_PATH by default
11+ # only, but this inherits stdout; we don't want that as it hangs when
12+ # tee'ing autopilot output into a file
13+ proc.launch_uris_as_manager(
14+ files, None,
15+ GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.STDOUT_TO_DEV_NULL,
16+ None, None, None, None)
17 if wait:
18 self.wait_until_application_is_running(desktop_file, 10)
19 return proc
20
21=== modified file 'debian/control'
22--- debian/control 2013-12-02 02:02:45 +0000
23+++ debian/control 2013-12-11 15:02:46 +0000
24@@ -85,7 +85,7 @@
25 Recommends: python3-xlib,
26 python3-evdev,
27 gir1.2-gconf-2.0,
28- gir1.2-glib-2.0,
29+ gir1.2-glib-2.0 (>= 1.39.0-0ubuntu1),
30 gir1.2-gtk-3.0,
31 gir1.2-ibus-1.0,
32 libautopilot-gtk (>= 1.4),
33@@ -136,7 +136,7 @@
34 Section: metapackages
35 Depends: ${misc:Depends},
36 gir1.2-gconf-2.0,
37- gir1.2-glib-2.0,
38+ gir1.2-glib-2.0 (>= 1.39.0-0ubuntu1),
39 gir1.2-gtk-3.0,
40 gir1.2-ibus-1.0,
41 python-autopilot,

Subscribers

People subscribed via source and target branches