Merge lp://staging/~stgraber/upstart/upstart-tests-pty into lp://staging/upstart

Proposed by Stéphane Graber
Status: Merged
Merged at revision: 1413
Proposed branch: lp://staging/~stgraber/upstart/upstart-tests-pty
Merge into: lp://staging/upstart
Diff against target: 19 lines (+2/-1)
1 file modified
init/tests/test_job_process.c (+2/-1)
To merge this branch: bzr merge lp://staging/~stgraber/upstart/upstart-tests-pty
Reviewer Review Type Date Requested Status
James Hunt Approve
Review via email: mp+140388@code.staging.launchpad.net

Description of the change

This fixes our current PPA build hang.

PPA don't allow writting to /dev/tty (for some weird reason), so upstart
uses a pty instead. However the function setting up the pty was a bit wrong
as it was doing a waitpid on the child before starting the mainloop watching
for the output coming to the pty.

So as soon as the pty buffer was full, everything would hang.

This simply moves the mainloop start before the waitpid, fixing the hang.

To post a comment you must log in.
Revision history for this message
James Hunt (jamesodhunt) wrote :

Good catch! LGTM - merged.

review: Approve

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