mirror of
git://git.proxmox.com/git/pve-access-control.git
synced 2025-01-20 14:03:43 +03:00
do not close STDIN if rune in foreground
This commit is contained in:
parent
527b2e7aed
commit
5a941ebef2
@ -531,13 +531,17 @@ sub fork_worker {
|
|||||||
# same algorythm as used inside SA
|
# same algorythm as used inside SA
|
||||||
# STDIN = /dev/null
|
# STDIN = /dev/null
|
||||||
my $fd = fileno (STDIN);
|
my $fd = fileno (STDIN);
|
||||||
close STDIN;
|
|
||||||
POSIX::close(0) if $fd != 0;
|
|
||||||
|
|
||||||
die "unable to redirect STDIN - $!"
|
if (!$sync) {
|
||||||
if !open(STDIN, "</dev/null");
|
close STDIN;
|
||||||
|
POSIX::close(0) if $fd != 0;
|
||||||
|
|
||||||
|
die "unable to redirect STDIN - $!"
|
||||||
|
if !open(STDIN, "</dev/null");
|
||||||
|
|
||||||
|
$outfh = PVE::Tools::upid_open($upid);
|
||||||
|
}
|
||||||
|
|
||||||
$outfh = PVE::Tools::upid_open($upid) if !$sync;
|
|
||||||
|
|
||||||
# redirect STDOUT
|
# redirect STDOUT
|
||||||
$fd = fileno(STDOUT);
|
$fd = fileno(STDOUT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user