Skip to content

Commit cc8a9eb

Browse files
committed
Document execve() limitation on Windows
Closes #1253
1 parent 0158579 commit cc8a9eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/proc/execve.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
* compiled by MSVC or Cygwin is launched instead, then only the stdio
5858
* file descriptors can be passed along.
5959
*
60+
* On Windows, the parent process must be a cosmo program. If you're
61+
* calling execve() from a program that wasn't launched by cosmopolitan
62+
* bash, or some similar program, then ask yourself if what you really
63+
* want is to either (a) call fork() first, or (b) use posix_spawn().
64+
*
6065
* On Windows, `argv` and `envp` can't contain binary strings. They need
6166
* to be valid UTF-8 in order to round-trip the WIN32 API, without being
6267
* corrupted.

0 commit comments

Comments
 (0)