3 ms·
I dont really know what to say from this without risking being downvoted. But, this coming from a Microsoft blog is a little... awkward. DOS heritage + really b
by jdright 10y ago
I dont really know what to say from this without risking being downvoted. But, this coming from a Microsoft blog is a little... awkward. DOS heritage + really bad shell implementations, well.. I avoid the hell out of using command line on any Windows. Luckily there is mintty.
- marcosdumay 10y ago> well.. I avoid the hell out of using command line on any Windows How do you avoid it if it's the only API available for spawning processes on Windows?
- alkonaut 10y agoHigh level Api's could easily provide this, e.g. the C# Process.Start(executable, args); Takes a single string as args, and has no overload taking an array as args, which formats it safely and correctly so that the receiving process would see the same string in its args vector. So while it seems to be pretty easily fixable, it hasn't been.
- marcosdumay 10y agoThe right way to do it would be to change the OS API into accepting an array of strings, and turn this function into an overlay that will have its parameters parsed and broken apart in user-space. But yes, if MS ever fixes this it's more likely that they'll go into the route you described. I can't wait to see how many bug reports with crazy descriptions it will create, and how many more overlays will be written to fix the bugs preserving backward compatibility.
- gaius 10y agoDOS's command line conventions come from the PDP-11 which pre-dates Unix.
- Piskvorrr 10y agoThe barest core does. Quoting and escaping...is not a part of that, IIRC.