cosmopolitan/test
Justine Tunney 3f3cb0650b
Have execve() escape double quotes in cmd.exe's preferred style
This makes it possible for us to use system() and popen() with paths
that redirect to filenames that contain spaces, e.g.

    system("echo.com hello >\"hello there.txt\"")

It's difficult to solve this problem, because WIN32 only allows passing
one single argument when launching programs and each program is allowed
to tokenize that however it wants. Most software follows the convention
of cmd.exe which is poorly documented and positively byzantine.

In the future we're going to solve this by not using cmd.exe at all and
instead embedding the cocmd.com interpreter into the system() function.
In the meantime, our documentation has been updated to help recalibrate
any expectation the user might hold regarding the security of using the
Windows command interpreter.

Fixes #644
2022-10-02 09:15:46 -07:00
..
dsp Pay off more technical debt 2022-09-12 23:36:56 -07:00
libc Have execve() escape double quotes in cmd.exe's preferred style 2022-10-02 09:15:46 -07:00
net Improve redbean method=get parameter handling 2022-09-19 20:04:39 -07:00
tool Improve system call wrappers 2022-09-19 15:06:25 -07:00
test.mk Support malloc() on bare metal 2021-02-24 00:53:24 -08:00