Reputation: 964
In Eclipse, when you run a program there is a wonderful red square button to stop it. I wonder how this is done. Does Eclipse just brutally kill the process corresponding or does it some nice safe verification on the process state before gently ask it to terminate itself or whatever?
Upvotes: 9
Views: 2524
Reputation: 10920
Yes, Eclipse sends a kill message to the program's process. So it is a brutal shutdown.
Upvotes: 8
Reputation: 346546
How exactly could eclipse do "verification on the process state" or ask programs to terminate themselves?
It would have to be a part of the Java standard API that all Java programs would have to implement. There is nothing like that. Ergo: eclipse cannot do that. All it can do is send a POSIX SIGTERM, but since there is no Java API to react to it, it cannot be usefully caught, so it leads to a hard termination of the process.
Upvotes: 7