[Mono-list] mono-service2 doesn't call OnStart

Amc Gmail amc1999 at gmail.com
Mon Oct 27 10:31:46 EDT 2008

> it's OS related issue. I will be waiting for running service daemonizer for
> all OS's.

i am not sure is that exactly why your service doesn't work in
non-debug, but what i found that mono-service & mono-service2 both
have OS-specific bug. they are using bash-extended syntax in case of
no-debug mode and that prevent your service.exe from being called. i
am talking about second from the bottom line of mono-service* which
look like:

exec /path/mono $MONO_OPTIONS /path/mono-service.exe $args </dev/null
>/dev/null 2>&1 &

and strictly speaking it should be:

exec /path/mono $MONO_OPTIONS /path/mono-service.exe $args 0</dev/null
1>/dev/null 2>&1 &

some shells on some OS'es don't like implicit </dev/null >/dev/null
redirections and as result exec failed silently.

again, i am not sure - it may not be your case, but hope it helps.
-- amc

More information about the Mono-list mailing list