mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-04 10:23:22 +00:00
Remove redhat bug whereby while(read(,my ,1)) {..} stuck in a loop
This commit is contained in:
parent
0ef5aa0ff2
commit
d936baebb8
1 changed files with 14 additions and 12 deletions
|
@ -103,6 +103,7 @@ if($options{x})
|
||||||
# this is the child
|
# this is the child
|
||||||
exec(@ARGV) || die("Could not exec within x: $!");
|
exec(@ARGV) || die("Could not exec within x: $!");
|
||||||
} else {
|
} else {
|
||||||
|
print "Forked to:$pid from $$" if($options{d});
|
||||||
# this is the parent
|
# this is the parent
|
||||||
|
|
||||||
use IO::Select;
|
use IO::Select;
|
||||||
|
@ -134,8 +135,7 @@ if($options{x})
|
||||||
{
|
{
|
||||||
if($fh == $READER)
|
if($fh == $READER)
|
||||||
{
|
{
|
||||||
while(read($READER,my $char,1))
|
read($READER,my $char,1);
|
||||||
{
|
|
||||||
print "Received:$char:\n" if ($options{d});
|
print "Received:$char:\n" if ($options{d});
|
||||||
last OUTTER if(ord($char) == $KILLOFF);
|
last OUTTER if(ord($char) == $KILLOFF);
|
||||||
|
|
||||||
|
@ -149,7 +149,6 @@ if($options{x})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
# if we can no longer write to client, it is gone
|
# if we can no longer write to client, it is gone
|
||||||
last unless(kill(0,$pid));
|
last unless(kill(0,$pid));
|
||||||
}
|
}
|
||||||
|
@ -169,6 +168,9 @@ if($options{x})
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.3 2004/04/29 14:59:05 duncan_ferguson
|
||||||
|
# Remove redhat bug whereby while(read(,my ,1)) {..} stuck in a loop
|
||||||
|
#
|
||||||
# Revision 1.2 2004/04/28 08:28:14 duncan_ferguson
|
# Revision 1.2 2004/04/28 08:28:14 duncan_ferguson
|
||||||
# added -d debug option for some small debug output
|
# added -d debug option for some small debug output
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue