Merge lp:~michihenning/unity-scopes-api/cpu-fix into lp:unity-scopes-api

Proposed by Michi Henning
Status: Merged
Approved by: Michal Hruby
Approved revision: 128
Merged at revision: 134
Proposed branch: lp:~michihenning/unity-scopes-api/cpu-fix
Merge into: lp:unity-scopes-api
Diff against target: 14 lines (+4/-0)
1 file modified
scoperegistry/SignalThread.cpp (+4/-0)
To merge this branch: bzr merge lp:~michihenning/unity-scopes-api/cpu-fix
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+201717@code.launchpad.net

Commit message

Fix to stop SignalThread from spinning if waitpid() is called at a point where there are no child processes.

Description of the change

Fix to stop SignalThread from spinning if waitpid() is called at a point where there are no child processes.

Please let's merge this before Jussi's branch for the new registry. Jussi's branch doesn't use SignalThread, but I don't want to have the last checked-in version of SignalThread harbor a bug, in case we want to resurrect that class at some point in the future.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Looks fine. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scoperegistry/SignalThread.cpp'
2--- scoperegistry/SignalThread.cpp 2013-11-21 21:44:00 +0000
3+++ scoperegistry/SignalThread.cpp 2014-01-15 06:30:02 +0000
4@@ -134,6 +134,10 @@
5 cerr << "scoperegistry: wait() failed: " << strerror(errno) << endl;
6 _exit(1);
7 }
8+ if (errno == ECHILD)
9+ {
10+ break; // We don't have any sub-processes
11+ }
12 continue; // Ignore stray SIGCHLD signals
13 }
14 if (pid == 0)

Subscribers

People subscribed via source and target branches

to all changes: