[omniORB] Re: Trouble when daemonising
Thorsten Glaser
thorsten.glaser at sygroup.ch
Fri Aug 29 10:40:29 BST 2008
Markus Schaber dixit:
>if "--daemonize" in sys.argv:
> daemonize();
Something like that will not work (the flag is ‘-d’), because it may
be the argument to some other flag.
A quite icky approach would be to parse the options ourselves without
help of the ORB, and recognise the -ORBfoo options, which are, of course,
not really documented, and only “usually” take one extra argument after
them (not always?), then dæmonise while keeping a FIFO open, which can
then be closed shortly before orb.run() is called so that the parent
process can exit.
A *huge* drawback is that error messages between dæmonisation and call
to orb.run() will not end up on stdio using this approach, that’s why
I’d only consider it if there is no different way.
Reinitialisation of the magic setup might be possible, but I don’t know
about the threads thing. Granted, if they don’t survive fork() there’s
almost certainly no way around.
Thanks,
//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