cosmopolitan/tool
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
..
args Pay off more technical debt 2022-09-12 23:36:56 -07:00
build Have execve() escape double quotes in cmd.exe's preferred style 2022-10-02 09:15:46 -07:00
decode Rewrite brk() and sbrk() 2022-10-01 23:11:56 -07:00
emacs Fix bug with sendfile() on XNU 2022-09-13 04:32:29 -07:00
hash Make important improvements 2022-09-14 22:39:08 -07:00
lambda Clean up some code 2022-08-20 12:32:51 -07:00
net Permit multiple certs with same common name 2022-09-27 18:17:04 -07:00
plinko Pay off more technical debt 2022-09-12 23:36:56 -07:00
scripts Introduce cosmocc and cosmoc++ toolchain commands 2022-09-20 04:34:03 -07:00
viz Rewrite brk() and sbrk() 2022-10-01 23:11:56 -07:00
tool.mk Make fixes and improvements 2022-06-18 01:46:12 -07:00