Start a Process for the invocation and capture stdout+stderr.
(cls, invocation)
| 261 | |
| 262 | @classmethod |
| 263 | def start(cls, invocation): |
| 264 | """ Start a Process for the invocation and capture stdout+stderr. """ |
| 265 | outfile = tempfile.TemporaryFile(prefix='iwyu') |
| 266 | process = subprocess.Popen( |
| 267 | invocation.command, |
| 268 | cwd=invocation.cwd, |
| 269 | stdout=outfile, |
| 270 | stderr=subprocess.STDOUT) |
| 271 | return cls(process, outfile, invocation.source_file) |
| 272 | |
| 273 | |
| 274 | class Invocation(object): |