I’ve been having trouble with call(exit) using pgf90. This problem actually came up when trying to compile and set up a climate model, in which an exit code should be passed to the setup script to verify that an initial run has executed correctly. This initial run did execute correctly, but call exit(code) (where code as passed to exit is 13) always returns an exit code of 127 , which halts the setup script unnecessarily. There is an easy workaround in my case, but it would be bad form for future compilations.
I then wrote a basic script to see what call exit(13) would return. The code:
program test implicit none print *,"Make it work, please." call exit(13) end program test
$ > pgf90 -o test.o test.f90
$ > ./test.o
Make it work, please.
$ > echo $?
So it appears that call exit conveys an exit code of 127 in this case as well. I’ve tried using export PGI_TERM=signal, but I haven’t had any luck. Any ideas?
For reference, I’m on an AMD-64 Linux machine with kernel 2.6.17-10.