]> git.proxmox.com Git - pve-common.git/commitdiff
upid_read_status: scan 4096 bytes to extract status
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 15 Mar 2013 09:18:54 +0000 (10:18 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 15 Mar 2013 09:18:54 +0000 (10:18 +0100)
Else we get 'unexpected status' if error message is longer than
1024 bytes (which happens quite often).

data/PVE/Tools.pm

index 20fc1ea3ad0f73c1ee4f03b8d6b93586833b6e5b..a55e4270c58f21d414ecb8c557bd9e32f17160d4 100644 (file)
@@ -740,7 +740,7 @@ sub upid_read_status {
     my ($task, $filename) = upid_decode($upid);
     my $fh = IO::File->new($filename, "r");
     return "unable to open file - $!" if !$fh;
-    my $maxlen = 1024;
+    my $maxlen = 4096;
     sysseek($fh, -$maxlen, 2);
     my $readbuf = '';
     my $br = sysread($fh, $readbuf, $maxlen);