Bug 71132

Summary: Stop build should send SIGINT instead of SIGTERM
Product: [Applications] kdevelop Reporter: 0mecir
Component: generalAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0.0b1   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description 0mecir 2003-12-23 19:20:10 UTC
Version:           3.0beta1 (using KDE KDE 3.1.2)
Installed from:    Mandrake RPMs
OS:          Linux

Stop Build sends the SIGTERM signal in order to stop the build. Problem is, that make doesn't remove unfinished output files when it receives this signal, so, if you then build again without any change to sources that would cause the interrupted file to compile again, make gets confused by (zero-size) .o file and doesn't build the .cpp file again. I found out that make removes unfinished object file when it receives SIGINT (ctrl+c) and that SIGTERM is not really required - SIGINT terminates make correctly.

Therefore, I suggest that SIGINT is sent to make instead of SIGTERM.
Comment 1 Harald Fernengel 2003-12-29 00:41:29 UTC
Can you check whether it works with the attached patch? My hacking capabilities are a bit limited at the moment...

Index: makewidget.cpp
===================================================================
RCS file: /home/kde/kdevelop/parts/outputviews/makewidget.cpp,v
retrieving revision 1.99
diff -u -3 -p -r1.99 makewidget.cpp
--- makewidget.cpp      26 Dec 2003 22:57:06 -0000      1.99
+++ makewidget.cpp      28 Dec 2003 23:39:55 -0000
@@ -283,7 +283,8 @@ void MakeWidget::startNextJob()

 void MakeWidget::killJob()
 {
-       childproc->kill();
+       if (!childproc->kill(SIGINT))
+           childproc->kill();
 }

 bool MakeWidget::isRunning()
Comment 2 Matt Rogers 2004-12-12 04:46:53 UTC
CVS commit by mattr: 

Use SIGINT instead of SIGTERM to stop the build. Based on a patch from
Harald Fernengel. Fixes bug 71132

BUG: 71132


  M +2 -1      makewidget.cpp   1.111


--- kdevelop/parts/outputviews/makewidget.cpp  #1.110:1.111
@@ -294,4 +294,5 @@ void MakeWidget::startNextJob()
 void MakeWidget::killJob()
 {
+        if (!childproc->kill(SIGINT))
         childproc->kill();
 }