This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163228 - [67cat] "Stop gracefully" process action
Summary: [67cat] "Stop gracefully" process action
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-21 11:42 UTC by aldobrucale
Modified: 2010-11-10 12:47 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2009-04-21 11:42:29 UTC
[ JDK VERSION : 1.6.* ]

When the user stops a running process using the "cancel" action on
the process list (or the "stop" button for a debugged application),
the process is stopped abruptly. It would be nice to have a "stop
gracefully" action which stops the application sith a sigint signal,
allowing the shutdown hooks to be called.
Comment 1 Jaroslav Tulach 2010-10-08 03:54:12 UTC
Please move to debugger if you are complaining about debugger behavior.
Comment 2 aldobrucale 2010-11-10 10:09:19 UTC
I'm not complaining about the current behaviour, this is a request for enhancement. I would like to be able to kill the running application from netbeans instead of doing it from the command line. The "cancel" action does the equivalent (under unix) of kill -9, which stops the application immediately, so that the shutdown hooks are not run. Of course this is the right thing to do by default, but the sigint option would be welcome.
Comment 3 Jaroslav Tulach 2010-11-10 12:14:44 UTC
What application? C, Ruby, Java, Java EE, etc.? How it is started? Try to be a little more specific.
Comment 4 aldobrucale 2010-11-10 12:47:02 UTC
I think that this may be useful for any application started by the user using the standard ide actions (run/debug), and which spawns its own process. This leaves out all the applications which run inside a container - in this case the run/stop action behaves differently, deploying/undeploying the application to a server.

The action I propose is useful when the application that is being developed in the IDE does something useful in response to a sigint signal - usually saving its state or freeing resources. For example a command-line application may want to exit cleanly when the user hits ctrl-c, or a background process when the system shuts down.