TerminalSession.st
changeset 3135 623a3d09191b
parent 3132 cadb44acf325
child 3276 180b977dcbe5
equal deleted inserted replaced
3134:5c5befefa92f 3135:623a3d09191b
   276                     ].
   276                     ].
   277                     status stillAlive ifFalse:[
   277                     status stillAlive ifFalse:[
   278                         exitStatus := status.
   278                         exitStatus := status.
   279                         OperatingSystem closePid:shellPid.
   279                         OperatingSystem closePid:shellPid.
   280                         shellPid := nil.
   280                         shellPid := nil.
   281                         terminatedAction value
   281                         terminatedAction valueWithOptionalArgument:status
   282                     ].
   282                     ].
   283                ].
   283                ].
   284 
   284 
   285     blocked ifFalse:[
   285     blocked ifFalse:[
   286         OperatingSystem unblockInterrupts
   286         OperatingSystem unblockInterrupts
   475     output isEmptyOrNil ifTrue:[^ output].
   475     output isEmptyOrNil ifTrue:[^ output].
   476 
   476 
   477     "/ the first line of output is the echo
   477     "/ the first line of output is the echo
   478     firstLine := output first withoutLeadingSeparators.
   478     firstLine := output first withoutLeadingSeparators.
   479     firstLine ~= aCommand ifTrue:[
   479     firstLine ~= aCommand ifTrue:[
   480         OperatingSystem isMSWINDOWSlike ifFalse:[
   480         (aCommand startsWith:firstLine) ifTrue:[
   481             "/ sigh - it is sometimes truncated (to be investigated)
   481             "/ sigh - it is sometimes truncated (to be investigated)
   482             (aCommand startsWith:firstLine) ifTrue:[
       
   483                 self halt.
       
   484                 ^ output.
       
   485             ].
       
   486             self halt.
   482             self halt.
   487         ].
   483             ^ output.
       
   484         ].
       
   485         "/ self halt.
   488         ^ output.
   486         ^ output.
   489     ].
   487     ].
   490     ^ output copyFrom:2
   488     ^ output copyFrom:2
   491 !
   489 !
   492 
   490 
   673 ! !
   671 ! !
   674 
   672 
   675 !TerminalSession class methodsFor:'documentation'!
   673 !TerminalSession class methodsFor:'documentation'!
   676 
   674 
   677 version
   675 version
   678     ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.17 2013-10-28 14:16:22 cg Exp $'
   676     ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.18 2013-11-06 16:22:04 cg Exp $'
   679 !
   677 !
   680 
   678 
   681 version_CVS
   679 version_CVS
   682     ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.17 2013-10-28 14:16:22 cg Exp $'
   680     ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.18 2013-11-06 16:22:04 cg Exp $'
   683 ! !
   681 ! !
   684 
   682 
   685 
   683 
   686 TerminalSession initialize!
   684 TerminalSession initialize!