cpp_is_king
Member
I hope someone makes it possible to run windows executables from inside the linux subsystem.
I thought about trying to do it myself. The idea would be to write a linux kernel driver that watches for process launch attempts. First it tries to launch it using the normal linux mechanism. If it fails, check the return code, and if the return code indicates that the file was not found or that it was in an invalid format, send an IPC to localhost on a pre-determined port.
On the other side, you've got a windows kernel driver listening on this same port, and when it gets process launch requests, it tries to launch it from windows. success or fail, it sends the response back over the same socket.
capturing terminal IO would be difficult unfortunately, but I think you could do it with some similar hackery. You'd probably need to inject a thread into the windows process that would monitor the terminal and send it to some daemon running in linux.
I thought about trying to do it myself. The idea would be to write a linux kernel driver that watches for process launch attempts. First it tries to launch it using the normal linux mechanism. If it fails, check the return code, and if the return code indicates that the file was not found or that it was in an invalid format, send an IPC to localhost on a pre-determined port.
On the other side, you've got a windows kernel driver listening on this same port, and when it gets process launch requests, it tries to launch it from windows. success or fail, it sends the response back over the same socket.
capturing terminal IO would be difficult unfortunately, but I think you could do it with some similar hackery. You'd probably need to inject a thread into the windows process that would monitor the terminal and send it to some daemon running in linux.