AW: [Mono-devel-list] RE: System.ServiceProcess

Jörg Rosenkranz joergr at voelcker.com
Thu Mar 18 03:50:53 EST 2004


Hello all,

	-----Ursprüngliche Nachricht----- 
	Von: mono-devel-list-admin at lists.ximian.com im Auftrag von A Rafael D Teixeira 
	Gesendet: Mi 17.03.2004 19:42 
	An: robertdunaway at usa.net 
	Cc: mono-devel-list at lists.ximian.com 
	Betreff: [Mono-devel-list] RE: System.ServiceProcess
	
	

	1 - Services run in the background. Well in linux any Mono executable can
	just have a launching script with a line like "mono myservice.exe &" and
	voilá it is running in the background. Forking a copy in background as you
	code normally for daemons, is a lot harder and unadvised. So: just compile
	it into a normal exe.
	
	2 - Services can be started/paused/resumed/stopped from outside. Well, you
	just have to implement the methods for that and expose them, probably via
	.NET remoting, or some Sockets programming. The linux way is to have those
	s/p/r/s as command-line parameters to the executable so that a second copy
	called from the console talks (you have to choose how) with the active one
	to deal with the action.
	
	

We have built a little daemon for this purpose which is embedding Mono.
This daemon is controled by signals. The daemon calls the service's
OnStart, OnStop, OnPause and OnContinue functions.

The daemon runs very well in our environment. I've posted an older
version of this daemon some months ago.

Joerg.



More information about the Mono-devel-list mailing list