Bug 71132 - Stop build should send SIGINT instead of SIGTERM
Summary: Stop build should send SIGINT instead of SIGTERM
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 3.0.0b1
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-23 19:20 UTC by 0mecir
Modified: 2004-12-12 04:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();
 }