[Development] Deprecating the static QProcess::startDetached() overloads

Oswald Buddenhagen oswald.buddenhagen at gmx.de
Wed Feb 27 20:35:21 CET 2019


On Wed, Feb 27, 2019 at 08:20:43PM +0300, Konstantin Tokarev wrote:
> 27.02.2019, 19:00, "Thiago Macieira" <thiago.macieira at intel.com>:
> > On Tuesday, 26 February 2019 22:59:12 PST J-P Nurmi wrote:
> >>  Is it technically possible to start() and then detach()?
> >
> > No, because the way to start changes. The detached mode requires a
> > double fork and the actual detaching from the TTYs.
> >
> > You can orphan / forget about the child, but it won't be detached.
> > It may still get killed by SIGHUP when the parent process exits.
> 
> That's what is really needed in many cases. Double fork and detaching
> from the TTYs is only required for starting daemons
> 
it's unreasonable to risk tearing down "detached" children on process
exit; that would be a totally fake api. also, you can't just pretend
that the children aren't yours, because you need to collect the zombies,
so at best the QProcess frontend could detach from them.

daemons are totally irrelevant here, because they handle the detaching
themselves.



More information about the Development mailing list