Sets the file descriptor to use as the stdin for spawned processes.
fd is -1 then any previously given fd is unset.
Note that if your intention is to have the stdin of the calling
process inherited by the child then
is a better way to go about doing that.
fd is noted but will not be touched in the current
process. It is therefore necessary that it be kept open by the
caller until the subprocess is spawned. The file descriptor will
also not be explicitly closed on the child side, so it must be marked
O_CLOEXEC if that’s what you want.
You may not set a stdin fd if a stdin file path is already set or if the launcher flags contain any flags directing stdin elsewhere.
This feature is only available on UNIX.
Available since: 2.40