Process.st
changeset 326 d2902942491d
parent 314 7581a5c57224
child 329 f14fc5ac11b7
equal deleted inserted replaced
325:46bca6125b93 326:d2902942491d
    22 
    22 
    23 Process comment:'
    23 Process comment:'
    24 COPYRIGHT (c) 1992 by Claus Gittinger
    24 COPYRIGHT (c) 1992 by Claus Gittinger
    25 	     All Rights Reserved
    25 	     All Rights Reserved
    26 
    26 
    27 $Header: /cvs/stx/stx/libbasic/Process.st,v 1.22 1995-03-25 01:23:35 claus Exp $
    27 $Header: /cvs/stx/stx/libbasic/Process.st,v 1.23 1995-04-11 14:51:25 claus Exp $
    28 '!
    28 '!
    29 
    29 
    30 !Process class methodsFor:'documentation'!
    30 !Process class methodsFor:'documentation'!
    31 
    31 
    32 copyright
    32 copyright
    43 "
    43 "
    44 !
    44 !
    45 
    45 
    46 version
    46 version
    47 "
    47 "
    48 $Header: /cvs/stx/stx/libbasic/Process.st,v 1.22 1995-03-25 01:23:35 claus Exp $
    48 $Header: /cvs/stx/stx/libbasic/Process.st,v 1.23 1995-04-11 14:51:25 claus Exp $
    49 "
    49 "
    50 !
    50 !
    51 
    51 
    52 documentation
    52 documentation
    53 "
    53 "
   196 
   196 
   197 !Process class methodsFor:'initialization'!
   197 !Process class methodsFor:'initialization'!
   198 
   198 
   199 initialize
   199 initialize
   200     TerminateSignal isNil ifTrue:[
   200     TerminateSignal isNil ifTrue:[
   201 	AbortSignal isNil ifTrue:[super initialize].
       
   202 
       
   203 	TerminateSignal := Signal new mayProceed:true.
   201 	TerminateSignal := Signal new mayProceed:true.
   204 	TerminateSignal nameClass:self message:#terminateSignal.
   202 	TerminateSignal nameClass:self message:#terminateSignal.
   205 	TerminateSignal notifierString:'unhandled process termination'.
   203 	TerminateSignal notifierString:'unhandled process termination'.
   206 
   204 
   207 	CoughtSignals := SignalSet with:AbortSignal with:TerminateSignal.
   205 	CoughtSignals := SignalSet with:AbortSignal with:TerminateSignal.
   529     ]
   527     ]
   530 ! !
   528 ! !
   531 
   529 
   532 !Process methodsFor:'suspend / resume'!
   530 !Process methodsFor:'suspend / resume'!
   533 
   531 
       
   532 stop
       
   533     "suspend the receiver process - will continue to run when a resume is sent.
       
   534      A stopped process will not be resumed for interrupt processing."
       
   535 
       
   536     suspendSemaphore notNil ifTrue:[suspendSemaphore signal].
       
   537     state := #stopped.
       
   538     Processor suspend:self
       
   539 !
       
   540 
   534 suspend
   541 suspend
   535     "suspend the receiver process - will continue to run when a resume is sent"
   542     "suspend the receiver process - will continue to run when a resume is sent.
       
   543      An interrupt will resume the receiver."
   536 
   544 
   537     suspendSemaphore notNil ifTrue:[suspendSemaphore signal].
   545     suspendSemaphore notNil ifTrue:[suspendSemaphore signal].
   538     Processor suspend:self
   546     Processor suspend:self
   539 !
   547 !
   540 
   548