[Mono-devel-list] monod: System.ServiceProcess on Linux

Rafael Teixeira monoman at gmail.com
Tue Mar 8 14:19:22 EST 2005


Hi Jorg,

Nice piece of work. 
But I do prefer to do it all in managed code using Mono.Unix, but I
don't have ready code to show so I may silence my big mouth...  ;()

Thanks for sharing your code,


On Tue, 8 Mar 2005 18:44:36 +0100, Jörg Rosenkranz <joergr at voelcker.com> wrote:
> Hi all,
> 
> Attached is the first incarnation of a Mono Linux daemon to run
> .NET services developed using System.ServiceProcess.
> 
> The daemon exports an internal call which is used by ServiceBase to
> get the service objects from the managed service.
> 
> To test this daemon you have to:
> 
>         1. Patch System.ServiceProcess and install the new assembly
>         2. Put the 3 other files in a directory
>         3. make (Very simple makefile, should do in most cases)
> 
> To run the created service:
> 
>         $ ./monod TestService.exe
> 
> Watch out for syslog messages (created by the daemon) and entries in
> TestService.log (created by the service itself).
> 
> The service can be controlled by signals.
> Pausing it:
> 
>         $ kill -USR1 <process id>
> 
> Continuing:
> 
>         $ kill -USR2 <process id>
> 
> Stopping:
> 
>         $ kill <process id>
> 
> A transcript of such a session in /var/log/messages looks like:
> 
> Mar  8 19:21:51 vidrd115 TestService.exe[5040]: Starting service Test Service...
> Mar  8 19:24:29 vidrd115 TestService.exe[5040]: Pausing service Test Service...
> Mar  8 19:25:18 vidrd115 TestService.exe[5040]: Continuing service Test Service...
> Mar  8 19:25:57 vidrd115 TestService.exe[5040]: Stopping service Test Service...
> 
> Known problems:
> If there is more than one service registered in Main it's not
> possible to select one using the -n parameter yet.
> 
> I would like to hear opinions on this implementation (My C skills
> are a bit rusty ;-)).
> Is it possible to include this daemon in Mono? A not so generic
> implementation is running our Windows service on lots of Linux
> servers without problems.
> 
> Thanks,
> Joerg
> 
> 
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.



More information about the Mono-devel-list mailing list