3

I am using Eclipse for Node.js development, along with the Nodeclipse Plugin. I am curious to know, that for a node.js program which is launched via Eclipse, how does Eclipse stop the process, when the stop icon in the console is pressed? My node.js program has signal handlers for SIGINT and SIGTERM- however, they are not invoked when the process is terminated from Eclipse.

Does Eclipse even send one of these signals? If it does not, how does Eclipse terminate the process? Is there a way to influence this?

ProgFan666
  • 93
  • 1
  • 7

2 Answers2

1

Eclipse kills external programs when you click the red button in the console view. More specifically it uses Process.destroy() method. See this bug for some explanation.

Even though this method could in theory terminate the process gracefully, in practice this causes SIGKILL to be sent under UNIX.

Michał Grzejszczak
  • 2,599
  • 1
  • 23
  • 28
  • Visual environments bring these obstacles to me when I cannot find a command anywhere in menus and the only way to find it is to search online, find words "red button" and look for it in the environment. – eel ghEEz May 16 '18 at 15:38
0

Nodeclipse does not have any special logic for that, that is Eclipse termination. It is said that process is killed. I don't know how exactly that is implemented on different OSes. To find out ask on Eclipse forum or get Eclipse for Commiters and try to debug.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332