diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-12 19:50:51 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-07-08 15:03:23 -0700 |
commit | 13a1995e9dc987d1560b38d16b76442261b4aa8d (patch) | |
tree | bb2ba2d6ce159b1123721756c616cb10c8170c1a /src/corelib/io/qprocess.h | |
parent | 8f1df9aaa87f1d899babce42a8fdbb28c13ae604 (diff) |
QProcess/Unix: add a few, basic session & terminal management flags
Doing setsid() and disconnecting from the controlling terminal are, in
addition to resetting the standard file descriptors to /dev/null, a
common task that daemons do. These options allow a QProcess to force a
child to be a daemon.
QProcess ensures that the operations are done in the correct order.
Change-Id: I3e3bfef633af4130a03afffd175e9451d2716d7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io/qprocess.h')
-rw-r--r-- | src/corelib/io/qprocess.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index 770be0cbf0..42bee0691b 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -182,6 +182,8 @@ public: // some room if we want to add IgnoreSigHup or so CloseFileDescriptors = 0x0010, UseVFork = 0x0020, // like POSIX_SPAWN_USEVFORK + CreateNewSession = 0x0040, // like POSIX_SPAWN_SETSID + DisconnectControllingTerminal = 0x0080, }; Q_DECLARE_FLAGS(UnixProcessFlags, UnixProcessFlag) struct UnixProcessParameters |