| 103 | } |
| 104 | |
| 105 | type binaryProcessor struct { |
| 106 | cmd *exec.Cmd |
| 107 | r *os.File |
| 108 | mt string |
| 109 | stderr *bytes.Buffer |
| 110 | |
| 111 | mu sync.Mutex |
| 112 | err error |
| 113 | |
| 114 | // There is a race condition between waiting on c.cmd.Wait() and setting c.err within |
| 115 | // c.wait(), and reading that value from c.Err(). |
| 116 | // Use done to wait for the returned error to be captured and set. |
| 117 | done chan struct{} |
| 118 | } |
| 119 | |
| 120 | func (c *binaryProcessor) Err() error { |
| 121 | c.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected