5b459c0b2e
- Replace blocking outBuf/errBuf capture with StdoutPipe+StderrPipe + goroutines - scanAndEmit runs in parallel for stdout and stderr, emitting each line via SSE broadcast and DB append immediately (not after cmd.Run completes) - Custom scanner split: bytes.TrimRight strips trailing \r so snapraid progress lines (e.g. '2%, 57396 MB\r') are stored as clean lines - scanner.Buffer increased to 128KB max to handle large outputs - Use sync.WaitGroup to ensure both scanners finish before MarkJobFinished - Fix PID capture: cmd.Process is nil before cmd.Start(), pass 0 instead