[Interest] Process started with QProcess::startDetached is still a child, and is killed when parent quits
Wiebe Cazemier
wiebe at halfgaar.net
Thu Mar 6 16:50:22 CET 2014
----- Original Message -----
> From: "Bo Thorsen" <bthorsen at ics.com>
> To: interest at qt-project.org
> Sent: Thursday, 6 March, 2014 12:56:00 PM
> Subject: Re: [Interest] Process started with QProcess::startDetached is still a child, and is killed when parent
> quits
>
> For this reason, I don't use QProcess but go for Windows specific code
> to run my upgrade executable:
>
> QString path = QDir::toNativeSeparators(d->downloader->path());
> ShellExecuteW(0, L"runas", (wchar_t*)path.utf16(), 0, 0, SW_NORMAL);
>
> Bo.
>
I discovered that it's actually only an issue while debugging... Starting the program normally does keep the started process running.
However, it did happen several times that when the installer started, the files couldn't be overwritten because the program was still hanging without a window. I haven't been able to explain that yet.
More information about the Interest
mailing list