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:
Dietmar Maurer 2013-03-15 10:18:54 +01:00
parent 60f4e8c713
commit cc9121d394

View File

@ -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);