summaryrefslogtreecommitdiffstats
path: root/software/unix.page
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2013-02-03 14:50:55 -0500
committerbnewbold <bnewbold@robocracy.org>2013-02-03 14:50:55 -0500
commit4cd33557ff86b2fa5f147b24263b669539f92b4e (patch)
tree1b5f53a8bfe4c29410ccb92a97782a97df5bd7ca /software/unix.page
parent1f07808290553a8a7308be4012ad73c6cfc99ff2 (diff)
downloadknowledge-4cd33557ff86b2fa5f147b24263b669539f92b4e.tar.gz
knowledge-4cd33557ff86b2fa5f147b24263b669539f92b4e.zip
software tidbits
Diffstat (limited to 'software/unix.page')
-rw-r--r--software/unix.page10
1 files changed, 10 insertions, 0 deletions
diff --git a/software/unix.page b/software/unix.page
new file mode 100644
index 0000000..879d8d0
--- /dev/null
+++ b/software/unix.page
@@ -0,0 +1,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().