[Bug 62517] New: Cannot kill child process in KProcess destructor.

Gary Cramblitt garycramblitt at comcast.net
Tue Aug 12 02:26:02 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=62517     
           Summary: Cannot kill child process in KProcess destructor.
           Product: kdevelop
           Version: unspecified
          Platform: RedHat RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: garycramblitt at comcast.net


Version:           Gideon 3.0.0a5 (using KDE KDE 3.1)
Installed from:    RedHat RPMs
OS:          Linux

I'm working on a KPart that uses KProcess to launch a child process in runmode NotifyOnExit.  I need to terminate child process with SIGTERM (not SIGKILL) if my KPart is closed/destroyed.  I cannot call KProcess->kill(SIGTERM) in the KProcess destructor (no error; simply doesn't do anything).  My guess is that KProcessController has already been destroyed by the time KProcess destructor is called.  Since my component is a KPart, I cannot hook application queryClose events, etc.  Please enhance KProcess to either:

1.  Invoke KProcess destructor before KProcessController is destroyed (assuming that is the problem), or

2.  Allow to override default SIGKILL when KProcess is destroyed with SIGTERM, or

3.  Expose an event or signal that KProcess is about to be destroyed before KProcessController is destroyed, or

4.  Expose en event or signal that KProcessController is about to be destroyed, or

5.  Enhance KParts to emit event or signal that user has requested close/destruction, ala KMainWindow::queryClose().

Option 2 might be the simplest solution, but would need to be overridable per KProcess instance.  Options 5 would be the best general-purpose solution. I can supply my source code, if needed, but it is a bit long.  Thanks.




More information about the KDevelop-devel mailing list