- Qt 6.7
- Qt Core
- C++ Classes
- UnixProcessParameters
- Qt 6.7.0 Reference Documentation

# UnixProcessParameters Struct

struct QProcess::UnixProcessParameters

This struct was introduced in Qt 6.6.

## Detailed Description

Note: This struct is only available on Unix platforms

This struct can be used to pass extra, Unix-specific configuration for the child process using QProcess::setUnixProcessParameters().

Its members are:

- UnixProcessParameters::flags Flags, see QProcess::UnixProcessFlags
- UnixProcessParameters::lowestFileDescriptorToClose The lowest file descriptor to close.

When the QProcess::UnixProcessFlags::CloseFileDescriptors flag is set in the `flags` field, QProcess closes the application's open file descriptors before executing the child process. The descriptors 0, 1, and 2 (that is, `stdin`, `stdout`, and `stderr`) are left alone, along with the ones numbered lower than the value of the `lowestFileDescriptorToClose` field.

All of the settings above can also be manually achieved by calling the respective POSIX function from a handler set with QProcess::setChildProcessModifier(). This structure allows QProcess to deal with any platform-specific differences, benefit from certain optimizations, and reduces code duplication. Moreover, if any of those functions fail, QProcess will enter QProcess::FailedToStart state, while the child process modifier callback is not allowed to fail.

See also QProcess::setUnixProcessParameters() and QProcess::setChildProcessModifier().