[Mono-list] Writing daemons in C#

Joe Mozelesky jmozelesky@netcarrier.com
Mon, 18 Nov 2002 14:23:56 -0500


From my trusty Wrox Professional C# book, Chapter 24 is called “Windows
Services.”  “In the .NET Framework, we can find service classes in the
System.ServiceProcess namespace that implement the three parts of a
service:

• We inherit from the ServiceBase class to implement a service.
• The ServiceController class is used to implement a service control
program.
• The ServiceProcessInstaller and ServiceInstaller classes are, as the
names suggest, classes to install and configure the service programs.”

A service on Windows is the equivalent of a daemon on Linux.  Note that
this is different from COM+ services .

So for instance if you wanted to write an FTP daemon that listens on a
port you might use System.ServiceProcess along with System.Net.Sockets.

However, when I browse the Class Status on the Mono homepage, I do not
see the System.ServiceProcess namespace anywhere, so I don't know if the
maintainers have any plan to implement this in Mono or not.  However
when I ran a search of the mailing list archives I came up with these
two links:

http://lists.ximian.com/archives/public/mono-patches/2002-March/001515.h
tml
http://lists.ximian.com/archives/public/mono-patches/2002-June/004426.ht
ml

Where System.ServiceProcess is referred to, so perhaps it is planned to
be implemented.

So I would suppose that means that you won't be able to write daemons
with C# and Mono until sometime in the future when the namespace has
been implemented.

But really I would have to ask why would you want to write a daemon in
C#?

Hope that helps,

Joe


-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Aschwin Wesselius
Sent: Wednesday, November 18, 2020 1:21 PM
To: mono-list@ximian.com
Subject: [Mono-list] Writing daemons in C#

Hello,
 
I just asked this similar question last week and didn't see any reply.
Maybe it is not the right list or whatever???
 
But since it is about C# on Linux I was thinking people on this list
might have an answer for me.
 
I want to know if it is possible to make your own daemons, and if so can
it be done in C# as well? Where can I find good documentation on writing
daemons for Linux? Second are there any tricks I have to take in account
when doing such thing in C#?
 
I hope you know what I mean.... Since this group is the only group
knowing about C# on the Linux OS and furthermore you are a bunch of
cracks hacking pretty good stuff, so knowledge is there I guess!!
 
Please hit me with answers this time = )
 
Regards,

Aschwin

PS: If this is a very stupid question afterall, please let me know