[Mono-devel-list] System.ServiceProcess (RE: [Mono-list] services and daemons)
joergr at voelcker.com
Tue Aug 19 10:04:30 EDT 2003
I've done a little proof of concept to run services under Mono/Linux.
The attached test program (quick and dirty!) is a little daemon
embedding Mono. It is able to instantiate a class based on ServiceBase
and calls the On... functions. It is controlled using signals.
How to test the sample:
- Apply supplied patch to System.ServiceProcess.ServiceBase
- Build the samples
- Run test daemon
testdaemon testservice.exe TestService TestService
kill -USR1 `cat /tmp/testdaemon.lock`
kill -USR2 `cat /tmp/testdaemon.lock`
kill `cat /tmp/testdaemon.lock`
It's my first embedded Mono app so please be forgiving ;-)
- Entry point of service will not be called
- Infrastructure of namespace System.ServiceProcess is not used
except of class ServiceBase
- Rudimental error and exception handling
- Only one service can be started in parallel
- CanPauseAndContinue is ignored
- Main thread is polling for signals
- Service class is not checked to be a child of ServiceBase
Any comments are highly appreciated!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2670 bytes
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030819/5bc70652/attachment.bin
More information about the Mono-devel-list