[omniORB] Trouble when daemonising

Thorsten Glaser thorsten.glaser at sygroup.ch
Fri Aug 29 08:20:54 BST 2008


Hello everyone,

I’ve got some trouble with omniORBpy when dæmonising. I’ve written a
Python module which basically does the same as the BSD libc daemon(3)
call (fork, setsid, close stdio, chdir to /) and also switches our
logging module from stdio to syslog. So far, this has worked quite ok.

Now I want to dæmonise just before calling the run method of the ORB,
but I need to initialise the ORB much earlier, since, for example, it
needs to parse command line arguments before I do. Dæmonising cannot
(easily) be done before ORB initialisation, since there’s a flag that
disables it, for debugging, similar to OpenNTPD.

Now the trouble is: when dæmonising, I do not get any CORBA calls,
unless I move the call to daemon() to _before_ the ORB is first
initialised (instantiated). I don’t know what really goes wrong, as
this is the first project where I use Python at all, even if I tried
to track it down, call poaCache.clear, etc. – when not dæmonising at
all (or before ORB initialisation), stuff works.

If this is desired, I could try to create a minimal example to re-
produce the problem. I’m using a hello-world-style IDL for testing.
But maybe someone already has an idea what the cause is.


Thanks in advance!

//Thorsten
-- 
SyGroup GmbH
Thorsten Glaser

Tel: +41 61 333 80 33            Güterstrasse 86
Fax: +41 61 383 14 67            4053 Basel
Web: www.sygroup.ch              thorsten.glaser at sygroup.ch



More information about the omniORB-list mailing list