- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- SIGINT to terminate a batch job?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 01:38 AM
тАО07-27-2009 01:38 AM
SIGINT to terminate a batch job?
I've a java program with a shutdownhook to catch a ctrl+c to clean some things before terminating.
Now I wanted to start the program with a submit and wondered if I can do a normal shutdown of the application.
Is there any way to do this or is a batch job always terminated abruptly?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:15 AM
тАО07-27-2009 03:15 AM
Re: SIGINT to terminate a batch job?
So if You send a signal 2 , the program should see no difference.
There are Unix-compatible KILL programs to send a signal, either in GNV or else on the freeware.
kill -2 procid
Process-id can be found if You know the batch entry number, by default the process name is BATCH_entry .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:17 AM
тАО07-27-2009 03:17 AM
Re: SIGINT to terminate a batch job?
delete/entry=entry-# queue-name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:29 AM
тАО07-27-2009 03:29 AM
Re: SIGINT to terminate a batch job?
BTW, instead of using SIGINT or other signals, the program could simply establish an EXIT routine ( atexit(exitproc) in C, don't know the corresponding Java call).
A stop/entry is then forcing the exit routine call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 04:01 AM
тАО07-27-2009 04:01 AM
Re: SIGINT to terminate a batch job?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 04:12 AM
тАО07-27-2009 04:12 AM
Re: SIGINT to terminate a batch job?
A stop/entry just forces exit, i.e. invokes an "atexit" routine.
Sending a signal 2 (KILL -SIGINT) is invoking a routine established by a signal(SIGINT,routine) call.
So my first answer told to use KILL on the process-id.
Stop/entry invokes only the exit routine, not the signal catcher.
I assume Your "shutdownhook to catch a ctrl+c" is a signal handler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 04:43 AM
тАО07-27-2009 04:43 AM
Re: SIGINT to terminate a batch job?
Thanks.