mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-08-07 12:28:05 +00:00
add ability to fork cli workers in background
This commit is contained in:
parent
dd2cfee072
commit
3036e8b1be
@ -820,14 +820,14 @@ sub check_worker {
|
|||||||
# STDOUT,STDERR are redirected to the filename returned by upid_decode
|
# STDOUT,STDERR are redirected to the filename returned by upid_decode
|
||||||
# NOTE: we simulate running in foreground if ($self->{type} eq 'cli')
|
# NOTE: we simulate running in foreground if ($self->{type} eq 'cli')
|
||||||
sub fork_worker {
|
sub fork_worker {
|
||||||
my ($self, $dtype, $id, $user, $function) = @_;
|
my ($self, $dtype, $id, $user, $function, $background) = @_;
|
||||||
|
|
||||||
$dtype = 'unknown' if !defined ($dtype);
|
$dtype = 'unknown' if !defined ($dtype);
|
||||||
$id = '' if !defined ($id);
|
$id = '' if !defined ($id);
|
||||||
|
|
||||||
$user = 'root@pve' if !defined ($user);
|
$user = 'root@pve' if !defined ($user);
|
||||||
|
|
||||||
my $sync = $self->{type} eq 'cli' ? 1 : 0;
|
my $sync = ($self->{type} eq 'cli' && !$background) ? 1 : 0;
|
||||||
|
|
||||||
local $SIG{INT} =
|
local $SIG{INT} =
|
||||||
local $SIG{QUIT} =
|
local $SIG{QUIT} =
|
||||||
|
Loading…
Reference in New Issue
Block a user