From kde-devel Tue Jun 29 16:28:12 2010 From: Robin Atwood Date: Tue, 29 Jun 2010 16:28:12 +0000 To: kde-devel Subject: Re: Child process not killed at logout Message-Id: <201006292328.12822.robin () binro ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=127782900214048 On Tuesday 29 June 2010, Thomas Lübking wrote: > QProcess::waitForFinished() has a timeout (30000ms by default), try calling > waitForFinished(-1); > > Thomas > > Am Tuesday 29 June 2010 schrieb Robin Atwood: > > I have an app which attaches a lot child processes using KProcess. When > > the application is closed by the user, the main class destructor > > essentially > > > > issues: > > myProc[k]->close(); > > myProc[k]->waitForFinished(); > > > > on each process. However, if I logout while the app is still running, the > > child processes are left running. After perusing the KMainWindow doc, I > > tried moving the code to "queryClose()" and also connecting to the > > "QCoreApplication::aboutToQuit()" signal, which both failed to close the > > processes. Note that the child processes are standard cli utilities which > > don't have an interactive mode to send shutdown commands to. Even a > > normal > > > > use close sometimes produces the message: > > QProcess: Destroyed while process is still running. > > > > The doc says that session management should call "queryClose()" at logout > > time but Qt is not waiting for it? Anybody have any insight into this? Nice idea but unfortunately it made no difference, the processes are still left orphaned. -Robin -- ---------------------------------------------------------------------- Robin Atwood. "Ship me somewheres east of Suez, where the best is like the worst, Where there ain't no Ten Commandments an' a man can raise a thirst" from "Mandalay" by Rudyard Kipling ---------------------------------------------------------------------- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<