-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements the Windows version of sys/exec #3
Comments
There are no parameter quoting rules on windows. Parameters are always a single string with all parameters. The CRT splits them up again in userspace for compatibility with C programs. |
There is a quoting rule to distinguish The stupid thing with Windows is that programs can implement their own un-quoting scheme, of which |
yes, the quoting rules described above are properties of the CRT, if you don't use the CRT you don't get those rules and just get one big parameter string (it's actually similar to how linux deals with parameters passed to executable interpreters). Linux actually keeps parameter arrays separated by parameter as they work their way through the kernel from one process to another. I've been trying to think of a way to make things easier, it would be good if the CRT's version of the posixey exec functiosn actually did the escaping correctly (they just join the arguments with spaces). |
Yes but
Unfortunately for the kind of control that |
yeah. Even a function in windows would be easier than the "real" fix of getting an actual new syscall to do it. (instead of the current easiest syscall which is NtCreateUserProcess. (I'm actually not sure if that's a "real" syscall) |
Target: Vista+
Problems:
PATHEXT
can be run directly (need confirmation on whetherCreateProcess
can launch.bat
directly orcmd.exe
has to be used).inherits
is racy on Windows since the inheritable state is global, and we need to restore it afterwards. Probably a lock is the best way atm.The text was updated successfully, but these errors were encountered: