Merge lp:~townsend/libertine/fix-lp1541584 into lp:libertine

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 171
Merged at revision: 171
Proposed branch: lp:~townsend/libertine/fix-lp1541584
Merge into: lp:libertine
Diff against target: 35 lines (+12/-2)
2 files modified
tools/libertine-lxc-manager (+6/-1)
tools/libertine-session-bridge (+6/-1)
To merge this branch: bzr merge lp:~townsend/libertine/fix-lp1541584
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+285111@code.launchpad.net

Commit message

Add exception handling around the select calls to avoid "crashes" in the programs.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/libertine-lxc-manager'
2--- tools/libertine-lxc-manager 2015-11-25 18:44:55 +0000
3+++ tools/libertine-lxc-manager 2016-02-04 20:25:29 +0000
4@@ -89,7 +89,12 @@
5
6 def main_loop():
7 while 1:
8- rlist, wlist, elist = select.select(descriptors, [], [])
9+ try:
10+ rlist, wlist, elist = select.select(descriptors, [], [])
11+ except InterruptedError:
12+ continue
13+ except:
14+ break
15
16 for sock in rlist:
17 if sock.fileno() == -1:
18
19=== modified file 'tools/libertine-session-bridge'
20--- tools/libertine-session-bridge 2015-11-23 20:04:30 +0000
21+++ tools/libertine-session-bridge 2016-02-04 20:25:29 +0000
22@@ -83,7 +83,12 @@
23 signal.signal(signal.SIGINT, socket_cleanup)
24
25 while 1:
26- rlist, wlist, elist = select.select(descriptors, [], [])
27+ try:
28+ rlist, wlist, elist = select.select(descriptors, [], [])
29+ except InterruptedError:
30+ continue
31+ except:
32+ break
33
34 for sock in rlist:
35 if sock.fileno() == -1:

Subscribers

People subscribed via source and target branches