[Mono-devel-list] Re: Mono-devel-list digest, Vol 1 #1576 - 3 msgs

Michael Rasmussen mir at miras.org
Fri Apr 1 22:10:06 EST 2005


> Message: 1
> Date: Fri, 1 Apr 2005 12:14:37 +0200
> From: Paolo Molaro <lupus at ximian.com>
> To: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-devel-list] Re: Mono-devel-list digest, Vol 1 #1574 - 16 msgs
> 
> The issue is that mono will use thread-specific data to execute
> the manage->unamanged transition after fork in the child (to
> pinvoke exec, for example), but that data is not there anymore.
> Currently there are two solutions to this issue:
> *) put the fork+exec in a helper library that you'll call
> using pinvoke
> *) write the IL code to perform the fork+exec (either using
> Re.Emit or by having an assembly with it). You'd need to get
> a pointer to the fork and exec functions and execute them with
> the calli instruction. The first option is preferred for
> portability and easy of implementation.
> 
This is fine if you want to call an external function in unmanage code
but in my case this is not want I want. I want to be able to start an
application written in C# and then, if so requested, fork the entire
application to the background running as a daemon.

Maybe I have missed an importing thing about your solutions, but in my
opinion they does not meet my requirements. As far as I have been able
to test with my prototypes it all work as intended in my specific case
due to the fact that it seems mono simply copies the functionality from
bg on unix - running the task as a background process in the current
shells environment see IEEE Std 1003.1.

I could off course make a wrapper in C which forked off by calling mono
with exec but that is not very portable and undermines the hole idea
behind C#.

Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael  rasmussen  cc
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
BOFH excuse #283:

Lawn mower blade in your fan need sharpening


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dette er en digitalt underskrevet brevdel
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050402/6ac4e052/attachment.bin 


More information about the Mono-devel-list mailing list