David,

I don't think there is anything you can do.  My kill man page (Mac OS X, BSD) 
says that a kill -9 is "non-catchable, non-ignorable kill". As to closing 
files, that would probably be OS dependent. Some other kill, such as -1 or -15 
might allow cleanup.

Bruce


On Aug 12, 2011, at 11:36 AM, David Ashley wrote:

> I want to create a Linux daemon program written in C that invokes a Rexx 
> script. 
> This means the script process will be running in the background without a 
> terminal interface or any normal SYSIN, SYSOUT, or SYSERR file handles 
> available 
> (I will be redirecting SYSOUT and SYSERR to a log file).
> 
> My question is what happens when I perform a kill -9 operation on the process 
> and how can I intercept that action in the ooRexx script to ensure the 
> program 
> shuts down gracefully? Will a CALL ON HALT statement catch this kind of 
> action? 
> And do I need to enable any other signal handling in the C part of the 
> program?
> 
> I am asking this because I am unsure if ooRexx will act differently in this 
> kind 
> of environment than it would as a foreground process. I just want to make 
> sure I 
> am not boxing myself into a corner here.
> 
> -- 
> 
> David Ashley
> ooRexx Development Team
> 
> 
> ------------------------------------------------------------------------------
> FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
> Subversion made easy with a complete admin console. Easy 
> to use, easy to manage, easy to install, easy to extend. 
> Get a Free download of the new open ALM Subversion platform now.
> http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel


------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy 
to use, easy to manage, easy to install, easy to extend. 
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to