]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tempfile.h
mingw: ensure temporary file handles are not inherited by child processes
[thirdparty/git.git] / tempfile.h
index 4219fe41bd3e2ad16f0b1caf55eedca0b2d9986e..2f0038decd5b6d00b55fa03ec8988a3810d1784f 100644 (file)
  *   * calling `fdopen_tempfile()` to get a `FILE` pointer for the
  *     open file and writing to the file using stdio.
  *
+ *   Note that the file descriptor returned by create_tempfile()
+ *   is marked O_CLOEXEC, so the new contents must be written by
+ *   the current process, not any spawned one.
+ *
  * When finished writing, the caller can:
  *
  * * Close the file descriptor and remove the temporary file by