outputview: use QProcess::nullDevice() as stdin for the build command
ClosedPublic

Authored by arichardson on Mar 31 2016, 4:15 PM.

Details

Summary

Otherwise it will block forever when the build needs to run a command
that reads from stdin

Test Plan

Building still works for me

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arichardson updated this revision to Diff 3046.Mar 31 2016, 4:15 PM
arichardson retitled this revision from to outputview: use QProcess::nullDevice() as stdin for the build command.
arichardson updated this object.
arichardson edited the test plan for this revision. (Show Details)
arichardson added reviewers: kfunk, mwolff.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMar 31 2016, 4:15 PM
kfunk requested changes to this revision.Mar 31 2016, 4:35 PM
kfunk edited edge metadata.

Isn't the build system design flawed if it waits for input?

This patch in turn simply works around and silently ignores the issue. I'd rather be "notified" about a command which is waiting for my input.

This revision now requires changes to proceed.Mar 31 2016, 4:35 PM
In D1275#24017, @kfunk wrote:

Isn't the build system design flawed if it waits for input?

This patch in turn simply works around and silently ignores the issue. I'd rather be "notified" about a command which is waiting for my input.

In my case it runs a command over ssh. If my ssh-key isn't added yet ssh-add will block on stdin (which is not obvious because the output is not displayed). If I set stdin to /dev/null it will run the ksshaskpass GUI so the build can continue.

I think a program printing an error because it got EOF instead of some input is more obvious than the build just waiting forever (I thought initially that it was just taking a long time).

kfunk added a comment.Apr 1 2016, 5:17 PM

Consider me undecided. Other opinions?

mwolff accepted this revision.Apr 1 2016, 7:27 PM
mwolff edited edge metadata.

I'm with both of you, and think this is a good idea.

Alex, I think you are right in saying that if KDevelop does not allow the user to give input, then we should tell the sub apps about it. This patch looks like it does just that. So I think we can accept it and land it.

Kevin, if this breaks anything, we can just tell the users: If your build system needs input, it's really flawed and not supported :)

This revision was automatically updated to reflect the committed changes.