Windows like services development in LINUX using MONO?
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.
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
How to Delete a Line from a Text File in C#
Allow Windows Service to Interact with Desktop
Entering Keys Manually with Entity Framework
Why Is It Bad to Use an Iteration Variable in a Lambda Expression
Can't Get Czech Characters While Generating a PDF
Why Does My .Net 4 Application Know .Net 4 Is Not Installed
C# Splitting Strings on '#' Character
Accessing a Variable from Another Script C#
Web App Blocked While Processing Another Web App on Sharing Same Session
#If Debug VS. Conditional("Debug")
How to Make a .Net Windows Forms Application That Only Runs in the System Tray
Where to Learn About VS Debugger 'Magic Names'
Do Try/Catch Blocks Hurt Performance When Exceptions Are Not Thrown