I'm running an old Fortran code as part of a bash script. It completes the execution of its main purpose and then writes this to stdout and hangs:
FORTRAN PAUSE
PAUSE prompt> To continue from background, execute 'kill -15 2658
I don't have access to the source code, but from this it looks like it's executing a FORTRAN PAUSE statement and waiting for user input. I expected to be able to do something like this to redirect stdin to it to get it to proceed:
my_fortran_code <<EOF
go
EOF
but no luck. It still just hangs with the same message.
If I could just automatically terminate it somehow after it gets to the PAUSE and proceed with the rest of the bash script that would be great. Any ideas?
EDIT
It's run on a remote machine that I can't log into and manually kill it by the pid. The runtime is important, and I can't just wait X minutes expecting a termination by that time. I'm guessing some kind of wrapper that runs this as a subprocess or thread and reads the text output and kills it may be the way to go...