News for hackers. Stuff that matters.
Re:The Unix process API is unreliable and unsafe by msm_ on Thursday March 23, 2023 @06:03AM (#35272362)
Correct me if I'm wrong, but this is how Window's ABI works. Even command line applications have to parse their arguments, and this is just something that C's runtime usually does before main (in contrast to linux ABI, where every process gets an argument array).
Re:The Unix process API is unreliable and unsafe by cryptonector on Thursday March 23, 2023 @12:20PM (#35277130)
Yes, yes, and it's terrible.
Re:The Unix process API is unreliable and unsafe by rand_flip_bit on Thursday March 23, 2023 @05:11PM (#35281335)
Pedantically, C’s runtime doesn’t parse the command line arguments, CommandLineToArgvW does, and that function lives in shell32.dll, not the C runtime (Nor is it dependent on the C runtime). Ofc the C runtime is free to ignore that routine and implement parsing itself using the results from GetCommandLine. Either way though, yeah, it has to parsed in the child process. But that isn’t a huge bottleneck.