fork_worker: use correct handle type for POSIX::write

$resfh can be a pipe from POSIX::pipe() or the upid output
handle, which is an IO::File, so we need to take its
fileno().

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: ed52a8435a ("fork_worker: use separate pipe for status messages")
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2017-12-27 11:11:05 +01:00
parent 918140af72
commit 4d9f4d62e4

View File

@ -525,7 +525,7 @@ sub fork_worker {
if !open(STDIN, "</dev/null");
$outfh = PVE::Tools::upid_open($upid);
$resfh = $outfh;
$resfh = fileno($outfh);
}