I have created a second process P2 using popen from first process P1.
and there were few open file descriptors in the P1. those open fd now become shared by other process as well P2. so what happened is P2 has created a file descriptor of its own and that refer to the open file of P1. It is happening Since open files are shared in case of popen".
I need to close P1 process, but before that I want to close all the shared file descriptors which was opened by P2.
Abhishek