fix for bug 3083477: special handle for linux ksh environment
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8201 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
fe112cf8ea
commit
9f8968566a
@ -53,12 +53,25 @@ else
|
||||
|
||||
$cmdref->{cwd}->[0] = cwd();
|
||||
# get info from files piped in as stdin
|
||||
if (-p STDIN) {
|
||||
my $data;
|
||||
while ( <STDIN> ) {
|
||||
$data.=$_;
|
||||
}
|
||||
$cmdref->{stdin}->[0]=$data;
|
||||
my $data;
|
||||
if (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/))
|
||||
{
|
||||
my $rin="";
|
||||
vec($rin,fileno(STDIN),1)=1;
|
||||
my $nfound=select($rout=$rin,"","",1);
|
||||
if ($nfound)
|
||||
{
|
||||
while ( <STDIN> ) { $data.=$_; }
|
||||
$cmdref->{stdin}->[0]=$data;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (-p STDIN) {
|
||||
while ( <STDIN> ) { $data.=$_; }
|
||||
$cmdref->{stdin}->[0]=$data;
|
||||
}
|
||||
}
|
||||
}
|
||||
# The noderange can be specified through a noderange file
|
||||
# the noderange file can be a relative path,
|
||||
|
Loading…
Reference in New Issue
Block a user