[Mono-list] linux, binfmts:Unexpected behavior
Jonathan Pryor
jonpryor at vt.edu
Fri Jan 4 23:22:28 UTC 2013
On Jan 2, 2013, at 1:02 PM, mabra at manfbraun.de wrote:
> I moved over a lot of utilities from windows to linux, but starting them using "mono ..." is a pain and luckily, I discovered "binfmts".
Presumably as suggested at:
http://www.mono-project.com/Guide:Running_Mono_Applications#Registering_.exe_as_non-native_binaries_.28Linux_only.29
Please don't do that; please follow the Application Deployment Guidelines and use a shell script wrapper:
http://www.mono-project.com/Guide:Running_Mono_Applications#Shell_Scripts
http://www.mono-project.com/Guidelines:Application_Deployment
The reason being for increased compatibility across Unix platforms, and because (as you note), it doesn't work "properly":
> Running via "binfmts" looks strange:
>
> myuser> WakeTheBox.exe hel
> AppDomain.CurrentDomain.BaseDirectory: /usr/sbin/
Why? I'm not entirely sure, but I would guess that binfmt works by having the kernel execute a "helper" program located in /usr/sbin, and the helper in turn is responsible for executing mono + the assembly, which may screw up mono's normal logic. The fact that it "screws things up" is documented at the above urls; _why_ it screws things up is not.
- Jon
More information about the Mono-list
mailing list