TerminalSession.st
changeset 3595 d212572ec418
parent 3317 4602d20cdba0
child 3713 a02088a8910d
--- a/TerminalSession.st	Sat Aug 08 16:30:07 2015 +0200
+++ b/TerminalSession.st	Mon Aug 17 15:02:19 2015 +0200
@@ -1,5 +1,9 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:libbasic2' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#TerminalSession
 	instanceVariableNames:'inStream outStream errStream readerProcess shellPid shellCommand
 		shellDirectory readerDelay pluggableCheckBeforeReadAction
@@ -465,6 +469,12 @@
         (gotPrompt := (sema waitWithTimeout:seconds) notNil) ifFalse:[
             newSize := collectedOutput size.
             Transcript show:'timeout - output size is: '; showCR:newSize.
+            newSize > 100000 ifTrue:[
+                self stopCollectingOutput.
+                self onPrompt:nil do:nil.
+                collectedOutput := nil.
+                TimeoutError raiseRequestErrorString:'GDB output too big'.
+            ].
             newSize = lastSize ifTrue:[
                 "/ self information:'Error: command timeout.'.
                 self stopCollectingOutput.
@@ -729,11 +739,11 @@
 !TerminalSession class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.23 2014-07-04 10:29:17 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.23 2014-07-04 10:29:17 cg Exp $'
+    ^ '$Header$'
 ! !