On 09:41 Wed 16 Aug     , Juergen Brauckmann wrote:
> Hi Nicolas.
> 
> Nicolas MASSÉ wrote:
> > It may be easier to catch the SIGHUP in the OpenCA server. Does anybody 
> > know 
> > how to do this ?
> 
> Instead of modifying openca and working with signal handlers, you may
> try to start openca with the linux-binary setsid, e.g. do a
> "run_init setsid openca_start"

In fact, during the night I found how to handle the sig_hup in OpenCA.

The patch is attached.

> setsid is supposed to start its argument in a new session, which is
> independend of the pty of the caller. That should work similar to nohup
> (but hopefully without the kernel panic :-)
> 
> setsid is normally only a system call; on Linux (and perhaps some other
> platforms) there is also an executable version.

Ok, I will try that !

Thanks for your help.

Nicolas MASSE.

diff -u -r a/src/common/lib/functions/initServer 
b/src/common/lib/functions/initServer
--- a/src/common/lib/functions/initServer       2006-08-08 16:03:05.123192500 
+0200
+++ b/src/common/lib/functions/initServer       2006-08-15 22:33:26.860539250 
+0200
@@ -239,6 +239,14 @@
     1;
 }
 
+### SIGHUP handler
+### 
+### Override the one in Net::Server
+
+sub sig_hup {
+       print STDERR "SIGHUP received and ignored !\n";
+}
+
 ## If the command will be changed in a script then executeCmd
 ## MUST be called again to check the permissions again.
 ## You MUST NOT call libDoCommand directly.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
OpenCA-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openca-devel

Reply via email to