In my C++ program I'm using ifstream("/etc/mtab", ios::ate|ios:in)
. An year back the program ran good but now ifstream::is_open()
is returning false. By digging I found /etc/mtab
is a symbolic link to /proc/mounts
--Update--
/proc/mounts
is again a symbolic link to /proc/self/mounts
which is actual file. I couldn't succeed opening this thought I'm running the program as a root user. So may be ifstream is following the symbolic link and is not able to open /proc/self/mounts