[Opensim-dev] Signal Handling

Rory Slegtenhorst rory.slegtenhorst at gmail.com
Mon Nov 7 15:50:08 UTC 2011


Dear List,

My very first post in the dev mailing list, as I am going to spend much
more time in my personal OpenSim.

I have written some code quite a while back and wanted to share my thoughts
and start a discussion about it.

*Signal Handling*
Currently, OpenSim services do NOT support POSIX signal handling when POSIX
is available. This support is available
on pretty much any *nix platform including MacOS X. Windows does NOT
support POSIX period.

In Mono, POSIX signal handling can be easily accomplished using the
mono.posix.dll.

I have currently implemented nothing more but the TERM signal, to ensure
the services are properly stopped, instead of
simply killed on the spot. This means that the service actually goes
through the shutdown procedure (if any).
The next goal would be to implement HUP to reload the service.

My current problem, is that the code is just there. No ifdef statements,
nothing.
I simply lack the knowledge in .NET/Mono to exclude the code from an
environment that does not include posix.
Some pointers in the right direction would be much appreciated.

*Discussion*
When creating services, there must be an easy way to start/stop them.
Especially on *nix this comes in handy.
Shoving the word "exit" or "shutdown" into the service cli is just not
working all the time and is error prone.

Adding POSIX signal handling would be considered "standard" in such
services. The fact that MS Windows does not
support POSIX signals is simply disregarded. The equivalent on Windows
would be to have a service binary that runs
the OpenSim services (I think that already exists).

There aren't that many other "standard" solutions to the same problem, and
although signal handling wouldn't work on
ONE platform (ONE being Windows), it is guaranteed to work on ALL others
(ALL being the *nix ones lol).

So to start the discussion, here are some questions:
1. Is there any interest in this code?
With this I mean: would we want POSIX signal handling or will we try to
develop a different way to solve the same problem?
2. If there is any interest, who do I send my patch to?

With kind regards,
Rory Slegtenhorst
rory dot slegtenhorst at gmail dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20111107/9c08bc64/attachment-0001.html>


More information about the Opensim-dev mailing list