-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Description
lwt/src/unix/lwt_process_stubs.c
Lines 91 to 97 in 3204200
#define string_option(opt) \ | |
(Is_block(opt) ? caml_stat_strdup_to_os(String_val(Field(opt, 0))) : NULL) | |
char_os | |
*progs = string_option(prog), | |
*cmdlines = caml_stat_strdup_to_os(String_val(cmdline)), | |
*envs = string_option(env), |
An "environment block" consists of a null-terminated block of null-terminated strings. Using caml_stat_strdup_to_os
doesn't work because it only supports null-terminated strings -- it stops on the first \0 and misses the rest of the block.
ocaml itself deals with this here:
but an external library like Lwt can't do the same thing. see ocaml/ocaml#11449 re: adding a public API.
Metadata
Metadata
Assignees
Labels
No labels