Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clear or flush pending I/O 1

Status
Not open for further replies.

pietrocomin

Programmer
Apr 29, 2020
3
IT
Trapping the interrupt (^C) fails if the signal is received during an I/O, i.e. I can jump to the desired location of a program but then I cannot perform any other I/O but that passing through an emergency call system ....
What I need is a system call clearing the pending I/O - excuse me, but I do not know how to format the page
C1234x
EXTERNAL TRAP
CALL SIGNAL (2,TRAP)
WRITE (6,*) 'press control-C'
READ (5,*) I
STOP
END
SUBROUTINE TRAP
CALL SYSTEM ('echo this is printed')
C I need a system call here
WRITE (6,*) 'but this not'
STOP
END
~
 
g77 compiler with LINUX UBUNTU - sorry to have forgotten this info. I am new. pietrocomin
 
Seems to work for me. Prints both the system echo and the write 6. I am using gfortran 7.5.0 on ubuntu 18.04
 
you are right. I also find that with gfortran works. unfortunately gfortran does not allow to open more units to the same file and therefore I have not considered to check that g77 and gfortran work the same. thanks for your attention. good easter in delay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top