[Mono-list] mono-service doesn't catch any signal
Robert Jordan
robertj at gmx.net
Wed Mar 2 05:24:10 EST 2011
On 02.03.2011 10:51, cometeor wrote:
> I'm using mono-2.8.2 on debian (virtual machine by openvz).
> My test service:
>
> class Test : ServiceBase
> {
> static void Main()
> {
> ServiceBase.Run(new Test());
> }
>
> static void Run()
> {
> while (!finished) {
> }
> }
>
> static bool finished = false;
> protected override void OnStart(string[] args)
> {
> Console.WriteLine("OnStart");
You're not supposed to block inside OnStart:
> Run();
> }
Robert
More information about the Mono-list
mailing list