[Development] Qt5.15 deprecating & Qt6 removing QProcess::setupChildProcess
Thiago Macieira
thiago.macieira at intel.com
Wed Feb 19 00:14:13 CET 2020
On Tuesday, 18 February 2020 04:11:01 PST Christian Kandeler wrote:
> In qbs, we use it to call setpgid() with the id of the newly created
> process. But I don't understand why that should matter at all: Whether we
> inject the code via an overriden virtual or a std::function is purely a
> question of implementation technique, is it not? How can there possibly be
> a functional difference?
The difference is how you communicate to QProcess that you want to run extra
code. Right now, you do this by deriving from QProcess and overriding
setupChildProcess. That means QProcessPrivate::start has no proper way of
knowing when you did so and must assume that you do want that, preventing us
from having some optimisations. See the two commits I've just uploaded to
QProcess 5.15: they are not allowed if user code is running.
I'm asking for a way that we can be certain that you want to run code. It will
clean up your code and QProcess's. And if we like it, we can have a flag
saying "my function is async-signal-safe too", which will allow the
optimisations and the use code.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Development
mailing list