This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make interrupt act as end of file, MacPerl Bug #542154
authorChris Nandor <pudge@pobox.com>
Thu, 9 May 2002 03:34:14 +0000 (03:34 +0000)
committerChris Nandor <pudge@pobox.com>
Thu, 9 May 2002 03:34:14 +0000 (03:34 +0000)
p4raw-id: //depot/macperl@16511

macos/macperl/MPConsole.cp

index e0eec2b..c18aa29 100644 (file)
@@ -5,6 +5,9 @@ Author  :       Matthias Neeracher
 Language       :       MPW C/C++
 
 $Log: MPConsole.cp,v $
+Revision 1.11  2002/05/08 07:17:12  neeri
+Make interrupt act as end of file (MacPerl Bug #542154)
+
 Revision 1.10  2002/01/04 03:34:45  pudge
 Modifications for universal headers 3.4
 
@@ -263,7 +266,7 @@ ssize_t MPConsoleSocket::read(const GUSIScatterer & scatterer)
        
        avail = int(GetHandleSize(input));
        
-       if (!avail)     {
+       if (!avail)     { 
                if (eof) {
                        eof = false;
                        
@@ -285,7 +288,7 @@ ssize_t MPConsoleSocket::read(const GUSIScatterer & scatterer)
                        GUSIErrorSaver saveError;
                        
                        gWantConsoleInput       = true;
-                       while(!(avail = int(GetHandleSize(input))) && !eof && window)
+                       while(!(avail = int(GetHandleSize(input))) && !eof && window && window->u.cons.selected)
                                GUSIContext::Yield(kGUSIPoll);
                        gWantConsoleInput       = false;