Merge lp://staging/~mhr3/dbus-test-runner/watch-pipes-for-hup into lp://staging/dbus-test-runner/13.10

Proposed by Michal Hruby
Status: Merged
Approved by: Ted Gould
Approved revision: 75
Merged at revision: 65
Proposed branch: lp://staging/~mhr3/dbus-test-runner/watch-pipes-for-hup
Merge into: lp://staging/dbus-test-runner/13.10
Diff against target: 235 lines (+56/-20)
5 files modified
libdbustest/Makefile.am (+2/-0)
libdbustest/bustle.c (+1/-1)
libdbustest/leash.c (+12/-11)
libdbustest/process.c (+13/-5)
libdbustest/service.c (+28/-3)
To merge this branch: bzr merge lp://staging/~mhr3/dbus-test-runner/watch-pipes-for-hup
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Alberto Mardegan (community) Approve
Review via email: mp+176092@code.staging.launchpad.net

Commit message

Watch created pipes for the G_IO_HUP event, as when a pipe closes, polling it will return this event.

Description of the change

Watch created pipes for the G_IO_HUP event, as when a pipe closes, polling it will return this event.

Without this patch, the test runner is somewhat racy as it expects to always get a child watch event before a pipe closing. Moreover not handling HUP can cause 100% CPU usage, since polling a closed pipe will keep returning POLLHUP and nothing in the code removed the pipe from the poll fds.

Also clean up the code in the watchdog process, use g_unix_signal_add, which plays nicer with glib's main loop.

Lastly, don't print empty line after each received line from the process tasks. :)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

116 + message = g_strdup_printf("Exitted with status %d", status);

"Exited"

Other than that, I tested your changes against one of my projects and it works just fine.
And the removal of the blank lines is invaluable, thanks! :-)

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

LGTM!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Nice job Jenkins bot!

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches