]> git.proxmox.com Git - pve-common.git/commitdiff
fork_worker: use correct handle type for POSIX::write
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 27 Dec 2017 10:11:05 +0000 (11:11 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 10 Jan 2018 13:12:34 +0000 (14:12 +0100)
$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: ed52a8435a6d ("fork_worker: use separate pipe for status messages")
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/RESTEnvironment.pm

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