mirror of
https://github.com/mappu/miqt.git
synced 2025-01-09 08:51:07 +00:00
Merge pull request #119 from mappu/miqt-clang-race-condition
genbindings: fix race condition in clang output pipe
This commit is contained in:
commit
c61b1b5e14
@ -67,13 +67,15 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
|
||||
inner, innerErr = clangStripUpToFile(pr, matcher)
|
||||
}()
|
||||
|
||||
// Go documentation says: only call cmd.Wait once all reads from the
|
||||
// StdoutPipe have completed
|
||||
wg.Wait()
|
||||
|
||||
err = cmd.Wait()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Command: %w", err)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
return inner, innerErr
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user