cosmopolitan/test/libc
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
..
bits Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
calls Have execve() escape double quotes in cmd.exe's preferred style 2022-10-02 09:15:46 -07:00
dns Pay off more technical debt 2022-09-12 23:36:56 -07:00
fmt Pay off more technical debt 2022-09-12 23:36:56 -07:00
intrin Improve system call wrappers 2022-09-19 15:06:25 -07:00
log Introduce testlib_extract() helper 2022-10-02 09:15:46 -07:00
mem Make important improvements 2022-09-14 22:39:08 -07:00
nexgen32e Make important improvements 2022-09-14 22:39:08 -07:00
release Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
runtime Have execve() escape double quotes in cmd.exe's preferred style 2022-10-02 09:15:46 -07:00
sock Change accept type to struct sockaddr * (#630) 2022-09-20 07:49:16 -07:00
stdio Have execve() escape double quotes in cmd.exe's preferred style 2022-10-02 09:15:46 -07:00
str Make important improvements 2022-09-14 22:39:08 -07:00
thread Improve pthread_join() 2022-09-16 14:02:06 -07:00
time Pay off more technical debt 2022-09-12 23:36:56 -07:00
tinymath Pay off more technical debt 2022-09-12 23:36:56 -07:00
x Pay off more technical debt 2022-09-12 23:36:56 -07:00
xed Pay off more technical debt 2022-09-12 23:36:56 -07:00
zipos Add fexecve() and map O_EXEC to O_PATH on Linux 2022-10-02 09:15:46 -07:00
test.mk Don't relocate file descriptor memory 2022-09-09 16:54:28 -07:00