[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Child process not killed at logout
From:       Robin Atwood <robin () binro ! org>
Date:       2010-07-01 10:01:49
Message-ID: 201007011701.49869.robin () binro ! org
[Download RAW message or body]

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?

OK, I have worked what the problem is. The program I am testing is KmTail, 
which I recently announced on kde-apps.org, and basically it attaches a lot of 
tail programs to monitor log files. Since most log files in /var/log are not 
user-readable, it has to run under kdesu to be of use. And, as we all know, 
programs running as root are not well supported by session management in KDE 
4. (They were in KDE3 but how to do this seems to be lost knowledge :( ). So 
that's the explanation but I don't think there is anything I can do about it.

Cheers
-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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic