martine/ninja — pull request #629 by maximuska (2013-07-28 20:17:48+00:00)
Title: Proposed/still running

Due to a somewhat popular demand..

There is currently no infrastructure to test this with gtest, but to avoid "great" being an enemy of "good" publishing this anyway. I did tested it manually using the following manifest: git show 22aa5f3:tst4.ninja, for what it worth (building different targets in separate and together)..

This pull request provides the following features:
- If ninja is running one or more commands lasting longer than 3 sec w/o status being updated (e.g., nothing starts/finishes) ninja starts printing "xxx (still running \) with '\' spinning moderately (test with: './ninja -f tst.ninja e5').
- If only one command is currently running, and no new commands can be started and the command emits output while running (e.g., a long-running generator), then ninja starts dumping the output immediately, in real-time, w/o waiting for the command to finish (test with: './ninja -f tst.ninja e6').