[Mono-dev] mono-service bugs

Avery Pennarun apenwarr at gmail.com
Mon Feb 4 14:45:52 EST 2008


> > On 04/02/2008, Robert Jordan <robertj at gmx.net> wrote:
> >> Mono-service might call an internal method, e.g
> >> Environment.SetUserInteractive(false), via reflection.
> >>
> >> Another way might be to check whether the process has
> >> a controlling terminal.
>
> I'd go for the first and set it to false unless --debug was
> supplied. This should even work for services written for
> Windows that have this logic in their Main ():
>
> if (Environment.UserInteractive)
>         // run in console mode
> else
>         ServiceBase.Run (...);

I think we'd always want to set it to false, even with --debug, right?
 Otherwise it'll try to run the non-service code path if you run under
mono-service --debug, which seems wrong to me.

Thanks,

Avery



More information about the Mono-devel-list mailing list