Windows Like Services Development in Linux Using Mono

Windows like services development in LINUX using MONO?

  1. Mono ships with a Windows Service compatible system called mono-service.

    • The Unix word for service is Daemon. Regular daemons can be found in /etc/init.d/ and are installed into the runlevel they are supposed to run in by being symlinked from /etc/rc.* directories.
  2. Just use p/invoke like you normally would. You can also check out the source code of some other simple mono-based projects like Banshee to see how they do p/invokes on Linux. Just search for banshee on google.com/codesearch.

Linux Mono Equivalent of .NET Windows Service

You may take a look at this thread.

How to migrate a .NET Windows Service application to Linux using mono?

Under Linux, deamons are simple background processes. No special control methods (e.g start(), stop()) are used as in Windows. Build your service as a simple (console) application, and run it in the background. Use a tool like daemonize to run a program as a Unix daemon, and remember to specify mono as the program to be activated.

As noted by others, mono-service is a host to run services built with the ServiceProcess assembly. Services built for Windows can use this method to run unmodified under Linux. You can control the service by sending signals to the process (see man page).

using mono-service to wrap a windows service on linux

Where is your LD_LIBRARY_PATH pointing to? Is libMonoPosixHelper.so in there?

How do I code a Mono Daemon

You should implement a service and use mono-service. Google for it and you'll find several examples.



Related Topics



Leave a reply



Submit