mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-21 08:52:08 +00:00
upid_read_status: scan 4096 bytes to extract status
Else we get 'unexpected status' if error message is longer than 1024 bytes (which happens quite often).
This commit is contained in:
parent
60f4e8c713
commit
cc9121d394
@ -740,7 +740,7 @@ sub upid_read_status {
|
|||||||
my ($task, $filename) = upid_decode($upid);
|
my ($task, $filename) = upid_decode($upid);
|
||||||
my $fh = IO::File->new($filename, "r");
|
my $fh = IO::File->new($filename, "r");
|
||||||
return "unable to open file - $!" if !$fh;
|
return "unable to open file - $!" if !$fh;
|
||||||
my $maxlen = 1024;
|
my $maxlen = 4096;
|
||||||
sysseek($fh, -$maxlen, 2);
|
sysseek($fh, -$maxlen, 2);
|
||||||
my $readbuf = '';
|
my $readbuf = '';
|
||||||
my $br = sysread($fh, $readbuf, $maxlen);
|
my $br = sysread($fh, $readbuf, $maxlen);
|
||||||
|
Loading…
Reference in New Issue
Block a user