Capturing system signals in a forked process.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Christopher_Ciemier
Posted On:   Thursday, February 1, 2007 10:24 AM

Hello jGurus! I am executing a java program via the 'java' task in ant. This progam has a shutdown hook that listens for system signals. It's purpose is to gracefully shutdown the application when the user types a ctrl-c, etc. Everything works as expected when the 'java' task is executed with fork="false". Based on information garnered from various sources, I should execute the process with fork="true". However, when I do this, the ctrl-c does not appear to be propagated from ant to my program. The shutdown hook is never called. This seems to technically make sense, but it is not desired behavior. Please indicate if it is possible to make ant propagate system signals to a forked process.    More>>

Hello jGurus!


I am executing a java program via the 'java' task in ant. This progam has a shutdown hook that listens for system signals. It's purpose is to gracefully shutdown the application when the user types a ctrl-c, etc. Everything works as expected when the 'java' task is executed with fork="false". Based on information garnered from various sources, I should execute the process with fork="true". However, when I do this, the ctrl-c does not appear to be propagated from ant to my program. The shutdown hook is never called. This seems to technically make sense, but it is not desired behavior.


Please indicate if it is possible to make ant propagate system signals to a forked process.


Best Regards,


--Chris

   <<Less
About | Sitemap | Contact