[Mono-list] Registering the MonoRuntime with Kernel

Marcus mathpup@mylinuxisp.com
Tue, 14 Sep 2004 17:12:36 -0500

First, I am quite okay with running Mono apps using "mono program.exe" or 
using a script wrapper. However, for those who insist on handling it more 
like Windows, it would be nice if Mono provided a mechanism to register 
itself with the kernel to execute CLI executables using binfmt_misc.

This would make things a little easier for people. Setting up the kernel to 
recognize the .exe extension by name is not difficult, but using magic 
numbers is a little harder. Even the user who knows that these capabilities 
exist has to look up the magic numbers to use (by searching web or mono-list 
archives). Complicating things is that Wine also handles .exe files. It 
trivial to detect whether Mono or Wine should run the program without more 
inspection than the kernel can do with binfmt_misc.

It would be nifty to provide a way for Mono to register itself so handle .exe 
files by name and magic number and to inspect whether the file is actually a 
Windows executable and hand those off to Wine.

Now, I do realize getting the system set up to handle binfmt_misc it 
system-dependent. Some systems require loading a module. Some require 
mounting a device, as well. So that part would be up to the administrator.

On Tuesday 14 September 2004 7:37 am, Chris Humphries wrote:
> This is not a Mono issue, it is an ignorance of the Linux kernel
> issue, no offense. It has existed in the Linux kernel for a long
> time, by the way :)