I am overriding the file open system calls (open, open64, fopen, fopen64, freopen, freopen64) in a dynamic library and setting LD_PRELOAD to point to that library. Here is a sample script I'm testing this on -
#!/bin/tcsh
source testcsh1.csh
source testbash1.sh
On RHEL 5.7 (tcsh 6.14.00), the open() called for testcsh1.csh and testbash1.sh is intercepted. However, the intercept (call to the overriding function in dynamic library) does not happen for the following -
- RHEL 6.6 (tcsh 6.17.00)
- RHEL 7.1 (tcsh 6.18.01)
- SLES 11 SP1 (tcsh 6.15.00)
- CentOS 6.6 (tcsh 6.17.00)
The open() which is not intercepted can be seen using gdb and strace.
Please advise on the possible reasons or the next steps to debug this. Thanks!