Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Ctrl C

crkkos
Beginner
606 Views
Is there anyway to trap ctrl-C, so that a fortran program exits cleanly?

I tried doing a

RESULT = SIGNAL(2,FINISH,-1)

Where Finish is a function that calls Stop.

But it still hardcrashes with the

forrtl: error (69): process interrupted (SIGINT)





0 Kudos
1 Reply
hahnjw
Beginner
606 Views

Why is it that you have to force your program to quit?

I'm not so sure there is a way to do what you are trying. If it's on *nix you could redirect stderr maybe or something equally as crude.

0 Kudos
Reply