Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Terminate running process
icon5.gif  Terminate running process [message #551388] Fri, 06 August 2010 08:55 Go to next message
Alexander  is currently offline Alexander Friend
Messages: 23
Registered: July 2009
Junior Member
Hello,

I use CDT for C development, and run into the following:
To gracefully stop an application, I use a signal handler to intercept SIGINT. Running the application from a command line works as expected. When ctrl-c is used to stop it, the signal handler is invoked.

But when I run the same application from Eclipse, how can I send the SIGINT? The terminate button apparently sends a SIGKILL (which cannot be intercepted). How can I change this behaviour?

TiA,

Alexander
Re: Terminate running process [message #551487 is a reply to message #551388] Fri, 06 August 2010 15:27 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
The eclipse suspend button may do what you want.
If not, then you can always sent a kill -2 to the process from the command line.

Marc


Alexander wrote on Fri, 06 August 2010 04:55
Hello,

I use CDT for C development, and run into the following:
To gracefully stop an application, I use a signal handler to intercept SIGINT. Running the application from a command line works as expected. When ctrl-c is used to stop it, the signal handler is invoked.

But when I run the same application from Eclipse, how can I send the SIGINT? The terminate button apparently sends a SIGKILL (which cannot be intercepted). How can I change this behaviour?

TiA,

Alexander

Re: Terminate running process [message #854756 is a reply to message #551487] Tue, 24 April 2012 08:07 Go to previous messageGo to next message
kintelk Missing name is currently offline kintelk Missing nameFriend
Messages: 2
Registered: December 2011
Location: Seoul, Republic of Korea
Junior Member
hm.
thx your answer.
but i still wonder how can i intercept terminate signal by using PDE programing?
i just want to make a PDE-Program which do somthing instead of terminating programe.

in short, when i click "terminate button" which is located upper-side of console view,
the PDE-Program do some work that i want to do .

[Updated on: Tue, 24 April 2012 08:14]

Report message to a moderator

Re: Terminate running process [message #855079 is a reply to message #854756] Tue, 24 April 2012 13:56 Go to previous message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
I think you would have to extend CDT to change the behavior of the terminate button.

Marc
Previous Topic:How to debug forked processes
Next Topic:Include works, namespace could not be resolved
Goto Forum:
  


Current Time: Thu Apr 18 20:48:09 GMT 2024

Powered by FUDForum. Page generated in 0.01884 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top