Commit 86e2b8d4 authored by Daniel Drake's avatar Daniel Drake

gspawn: document FD_CLOEXEC behaviour

G_SPAWN_LEAVE_DESCRIPTORS_OPEN must be set to enable the optimized
posix_spawn codepath, so this flag is likely to see more usage now.

Document that FD_CLOEXEC can be used to cause file descriptors to be
automatically closed while this flag is used.
parent 156d0096
......@@ -638,10 +638,11 @@ g_spawn_sync (const gchar *working_directory,
* is equivalent to calling CloseHandle() on the process handle returned
* in @child_pid). See g_child_watch_add().
*
* %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file
* descriptors will be inherited by the child; otherwise all descriptors
* except stdin/stdout/stderr will be closed before calling exec() in
* the child. %G_SPAWN_SEARCH_PATH means that @argv[0] need not be an
* Open UNIX file descriptors marked as `FD_CLOEXEC` will be automatically
* closed in the child process. %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that
* other open file descriptors will be inherited by the child; otherwise all
* descriptors except stdin/stdout/stderr will be closed before calling exec()
* in the child. %G_SPAWN_SEARCH_PATH means that @argv[0] need not be an
* absolute path, it will be looked for in the `PATH` environment
* variable. %G_SPAWN_SEARCH_PATH_FROM_ENVP means need not be an
* absolute path, it will be looked for in the `PATH` variable from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment