[NinjaBuildCommand] Factor out spawnAndWaitForCommand().
[NinjaBuildCommand] Factor out spawnAndWaitForCommand().
apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild