diff options
| author | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
|---|---|---|
| committer | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
| commit | cd2dad3bc7ae0ee0a18b7b20a945009362ec3851 (patch) | |
| tree | 5a622ec4193e9bc899f6499f936848a661be29cb /NonInheritingProcess.hpp | |
| parent | 558c0b9d6ecf70c5222e2069ece1fea3656c75d7 (diff) | |
| parent | 291b3817bf0c7a742e9e17d42c94fc8c9530e40d (diff) | |
Merge branch 'debian/latest' into debian/trixie-backports
Diffstat (limited to 'NonInheritingProcess.hpp')
| -rw-r--r--[-rwxr-xr-x] | NonInheritingProcess.hpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/NonInheritingProcess.hpp b/NonInheritingProcess.hpp index cf6cd2b3..c38d41ed 100755..100644 --- a/NonInheritingProcess.hpp +++ b/NonInheritingProcess.hpp @@ -1,35 +1,35 @@ -#ifndef NON_INHERITING_PROCESS_HPP__
-#define NON_INHERITING_PROCESS_HPP__
-
-#include <QProcess>
-#include "pimpl_h.hpp"
-
-class QObject;
-
-//
-// class NonInheritingProcess - Manage a process without it inheriting
-// all inheritable handles
-//
-// On MS Windows QProcess creates sub-processes which inherit all
-// inheritable handles, and handles on Windows are inheritable by
-// default. This can cause the lifetime of objects to be unexpectedly
-// extended, which in turn can cause unexpected errors. The motivation
-// for this class was implementing log file rotation using the Boost
-// log library. The current log file's handle gets inherited by any
-// long running sub-process started by QProcess and that causes a
-// sharing violation when attempting to rename the log file on
-// rotation, even though the log library closes the current log file
-// before trying to rename it.
-//
-class NonInheritingProcess
- : public QProcess
-{
-public:
- NonInheritingProcess (QObject * parent = nullptr);
- ~NonInheritingProcess ();
-
-private:
- class impl;
- pimpl<impl> m_;
-};
-#endif
+#ifndef NON_INHERITING_PROCESS_HPP__ +#define NON_INHERITING_PROCESS_HPP__ + +#include <QProcess> +#include "pimpl_h.hpp" + +class QObject; + +// +// class NonInheritingProcess - Manage a process without it inheriting +// all inheritable handles +// +// On MS Windows QProcess creates sub-processes which inherit all +// inheritable handles, and handles on Windows are inheritable by +// default. This can cause the lifetime of objects to be unexpectedly +// extended, which in turn can cause unexpected errors. The motivation +// for this class was implementing log file rotation using the Boost +// log library. The current log file's handle gets inherited by any +// long running sub-process started by QProcess and that causes a +// sharing violation when attempting to rename the log file on +// rotation, even though the log library closes the current log file +// before trying to rename it. +// +class NonInheritingProcess + : public QProcess +{ +public: + NonInheritingProcess (QObject * parent = nullptr); + ~NonInheritingProcess (); + +private: + class impl; + pimpl<impl> m_; +}; +#endif |
