[Mono-dev] System.Unix.Native.Syscall.fork is commented out

Phil Garcia phil at thinkedge.com
Wed Nov 5 23:08:30 EST 2008


On Wed, Nov 5, 2008 at 4:45 PM, Cliff Stanford <cliff at may.be> wrote:

> I don't want to turn this into a language argument but my feeling was
> that mono was allowing C# to become a serious Unix programming language.
>
> Becoming a daemon is a common part of Unix programming.  I don't know
> anything about the Mono internals but it seems to me that there should
> be some way to achieve it.  The Service paradigm, whilst great for
> porting of Windows code, just isn't what is needed for true Unix
> programming.
>
I just want to point out that the C# compiler and the .NET Framework provide
a much better framework for programming for Unix applications than the
traditional POSIX API model. Both the C# language and .NET Framework are
designed from the ground up to support multithreading within a single
application process space. This is opposite of the POSIX model where fork()
was necessary when Unix processes were only single threaded. POSIX threads
are a relatively new feature for Unix. In fact, threads were added to POSIX
to cope with the limitations and inefficiencies of fork() and the
programming model around it.

I think is important to realize that .NET and POSIX propose different
solutions and programming models. Attempting to use fork() in a .NET
application or service is opposite to the design goals of .NET which are
(among lots of other things) to provide better, alternative solutions to the
POSIX model.

Just my, hopefully helpful, two cents. No flames please.

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081105/346600ef/attachment.html 


More information about the Mono-devel-list mailing list