We are running into the following behavior:
An executable, say, "om" is built into a directory.
I copy this executable into a directory with absolute path such as: /home/eng/abhi/test/bin
Then from a working directory I do: /home/eng/abhi/test/bin/om
The program executes fine.
Next, I copy the same binary executable into a directory with a much longer path such as: /home/eng/abhi/ABCD1234ABCD1234/AnotherTest/bin
Then from the same working directory as previously, I try to run: /home/eng/abhi/ABCD1234ABCD1234/AnotherTest/bin/om
Doing so creates a hang.
If the program is reading from a file, did you also copy the file it is reading from together with the binary? Maybe a relative path is specified for that file. It sounds like a reason could be that the program tries to read but cannot find the file and is waiting for input instead.
No, the file read from is in the same directory. The program completes everything but hangs as it is existing. That is,
! all the program lines
STOP ! hang happens at this STOP statement.
End Program OM
You see this is chasing in the dark without looking at the source code. Another guess is that you never closed the unit for reading and it hangs therefore.