Hi,
I have an application that uses a fork and and the execv function to start an application.
The problem is that I don't want the child process to inherit the open files of the parent.
I found out that the child is able to access the files opened by the parent before the fork.
Is there a way to close all the files opened in the child process before launching the execv?
Is there another way to solve this problem?
Thanks in advance.
I have an application that uses a fork and and the execv function to start an application.
The problem is that I don't want the child process to inherit the open files of the parent.
I found out that the child is able to access the files opened by the parent before the fork.
Is there a way to close all the files opened in the child process before launching the execv?
Is there another way to solve this problem?
Thanks in advance.