From 85f758bd0de3bb00e67ad02c21d10697ebda8234 Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 9 Mar 2015 13:56:26 -0400 Subject: [PATCH] defect 4587 - fix xcatd msg for undefined variable: Use of uninitialized value $line in length --- xCAT-server/sbin/xcatd | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index b99e1a9de..840e6a7a4 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -2201,6 +2201,7 @@ sub get_request { $flags |= O_NONBLOCK; #we want sysread to bail on us, select seems to be evil to us still.. fcntl($sock,F_SETFL,$flags); my $bytesread; + if (!($line) ) { $line = ''; } do { $bytesread=sysread($sock,$line,65536,length($line)) } while ($bytesread); if (length($line)==0) { if (not defined $bytesread and ($! == EAGAIN or $! == ECHILD)) { next; } # ECHILD makes no sense, but some platform does it