From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- NonInheritingProcess.hpp | 70 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'NonInheritingProcess.hpp') diff --git a/NonInheritingProcess.hpp b/NonInheritingProcess.hpp index cf6cd2b3..c38d41ed 100755 --- a/NonInheritingProcess.hpp +++ b/NonInheritingProcess.hpp @@ -1,35 +1,35 @@ -#ifndef NON_INHERITING_PROCESS_HPP__ -#define NON_INHERITING_PROCESS_HPP__ - -#include -#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 m_; -}; -#endif +#ifndef NON_INHERITING_PROCESS_HPP__ +#define NON_INHERITING_PROCESS_HPP__ + +#include +#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 m_; +}; +#endif -- cgit v1.2.3