]> git.ipfire.org Git - thirdparty/libvirt.git/commit
command: check for fork error before closing fd
authorWen Congyang <wency@cn.fujitsu.com>
Wed, 30 May 2012 09:20:44 +0000 (17:20 +0800)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Jun 2012 22:23:21 +0000 (18:23 -0400)
commitb5df0ffe7414f2a3699b8fd4365c093aa586c196
treef7824103907fdfe2bc60260bb5f606466380321d
parentbd670db3f0d80517b2556acea3ceffc5700e3edb
command: check for fork error before closing fd

We should not set *outfd or *errfd if virExecWithHook() failed
because the caller may close these fds.

Bug present since v0.4.5 (commit 60ed1d2a).
(cherry picked from commit 746ff701e8727439cac8ca72531d82e5cb7fa129)
src/util/command.c