summaryrefslogtreecommitdiffstats
path: root/software/unix.page
blob: 879d8d0db4fb30eefae6f9f793d441024d8c5ace (plain)
1
2
3
4
5
6
7
8
9
10

File Descriptors after fork()
-------------------------------

When opening a file::
    
    fcntl(fd, F_SETFD, FD_CLOEXEC);

In python, you can pass the ``close_fds`` argument to subprocess.Popen() to
close all file descriptors just after fork().