SUBROUTINE SET_CONTROLC_AST C C Routine to enable Control/C AST's. C INCLUDE 'COM.INC/NOLIST' EXTERNAL CONTROLC_AST IF ( (.NOT. BATCH_MODE) .AND. (.NOT. SLAVE_MODE) ) THEN STATUS = SYS$QIOW(,%VAL(LCHAN_IN), 1 %VAL(IO$_SETMODE + IO$M_CTRLCAST),,,, 1 CONTROLC_AST,,,,,) CALL CHECK_STATUS('SET_CONTROLC_AST',STATUS) ENDIF RETURN END SUBROUTINE CONTROLC_AST C C This routine is entered when a CTRL/C is typed during a GET/SEND, C DUMP, or SCRIPT command. It cancels the local and remote I/O, C cancels all timer requests, and sets the CTRL/C typed flag. We C also do a wakeup and set the interrupt typed flag just incase we C get here in interactive mode (shouldn't happen in passall mode). C INCLUDE 'COM.INC/NOLIST' CALL CANCEL_IO() ! Cancel all I/O. CALL SYS$CANTIM(,) ! Cancel all timer requests. CALL SYS$SETEF(%VAL(TIMER_EFN)) ! Set the timer event flag. CONTROLC_TYPED = .TRUE. ! Show CTRL/C was typed. INTERRUPT_TYPED = .TRUE. ! Treat like interrupt character. CALL WAKE_UP() ! Wake up hibernate in mainline. IF (CMD_MODE) THEN CLOSE (UNIT=CMD_UNIT) ! Close the command file. CMD_MODE = .FALSE. ! Show not in command mode. ENDIF RETURN END SUBROUTINE CANCEL_IO C C This routine is used to cancel the local and remote I/O. C C The status return from the SYS$CANCEL's are not checked C since this routine is called from the error routine. C INCLUDE 'COM.INC/NOLIST' C C Cancel the local I/O (if any). C IF ( (.NOT. BATCH_MODE) .AND. (.NOT. SLAVE_MODE) ) THEN STATUS = SYS$CANCEL(%VAL(LCHAN_IN)) STATUS = SYS$CANCEL(%VAL(LCHAN_OUT)) C CALL CHECK_STATUS('CANCEL_LOCAL',STATUS) ENDIF C C Cancel the remote I/O (if any). C STATUS = SYS$CANCEL(%VAL(RCHAN_IN)) STATUS = SYS$CANCEL(%VAL(RCHAN_OUT)) C CALL CHECK_STATUS('CANCEL_REMOTE',STATUS) RETURN END SUBROUTINE WAKE_UP C C Subroutine to wake up hibernate state. C INTEGER*4 STATUS, SYS$WAKE, CHECK_STATUS STATUS = SYS$WAKE(,) ! Wake us up. CALL CHECK_STATUS('WAKE_UP',STATUS) RETURN END SUBROUTINE RESET_WORLD C C Exit handler. C INCLUDE 'COM.INC/NOLIST' CALL SYS$SETSWM(%VAL(0)) ! Reenable swapping. CALL SYS$SETRWM(%VAL(0)) ! Reenable resource wait. C CALL SYS$SETPRI(,,%VAL(4),) ! Lower priority. IF (.NOT. STARTUP) THEN CALL SETUP_LOCAL(.FALSE.) ! Return local to normal mode. ENDIF RETURN END