Re:I'm “still afraid to use spaces in file names” years old
by dale_glass on Thursday November 11, 2021 @09:19AM
(#29188069)
Microsoft is in full control of the Windows kernel, so they can make it care about whatever they want to, and one would think better argument passing would be a nice quality of life improvement. Less nonsense for developers to deal with, and less weird bugs on the platform.
Re:I'm “still afraid to use spaces in file names” years old
by exciteabletom on Thursday November 11, 2021 @09:34AM
(#29188205)
Sure, but MS values backwards compatibility a lot.
They aren't going to break existing API or bloat the kernel with a bunch of functions that do the same thing.
Re:I'm “still afraid to use spaces in file names” years old
by Joker_vD on Thursday November 11, 2021 @10:15AM
(#29188709)
They can either add a new API which almost nobody would use ― because everyone already learned to use the existing one and either reused or reimplemented the MSVCRT's logic so that most of the software parse the command lines the same way; or they can literally break every single program in existence by breaking the interface of CreateProcess ― which is just as likely as Linux breaking the interface of execve(2).
Giving CreateProcess a new flag so it would to correctly accept "path\\to\\my\\program.exe\0arg_1\0second argument\0argument with literal \" symbol" (with an implicit \0 terminating it) as lpszCmdLine is an easy part; the hard part would be forcing everyone to switch to using it.
Also, I'm pretty certain this processing happens in the user space, and Win32 API is already bloated beyond any belief.
Oh and cmd.exe uses a different escaping scheme than the CRT.