Skip to content

Commit cb03fda

Browse files
committed
hostagent: fix logging QEMU
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 14a3842 commit cb03fda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/hostagent/hostagent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ func (a *HostAgent) Run(ctx context.Context) error {
133133
if err != nil {
134134
return err
135135
}
136-
defer logPipeRoutine(a.l, qStdout, "qemu[stdout]")
136+
go logPipeRoutine(a.l, qStdout, "qemu[stdout]")
137137
qStderr, err := qCmd.StderrPipe()
138138
if err != nil {
139139
return err
140140
}
141-
defer logPipeRoutine(a.l, qStderr, "qemu[stderr]")
141+
go logPipeRoutine(a.l, qStderr, "qemu[stderr]")
142142

143143
a.l.Infof("Starting QEMU (hint: to watch the boot progress, see %q)", filepath.Join(a.instDir, filenames.SerialLog))
144144
a.l.Debugf("qCmd.Args: %v", qCmd.Args)

0 commit comments

Comments
 (0)