Introduce posix_spawn_file_actions_addchdir_np()

This commit is contained in:
Justine Tunney 2023-10-11 20:26:28 -07:00
parent f92ad74e6b
commit 3a1f887928
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
25 changed files with 446 additions and 748 deletions

View file

@ -35,6 +35,7 @@
#include "libc/proc/describefds.internal.h"
#include "libc/proc/ntspawn.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/at.h"
#include "libc/sysv/consts/o.h"
#include "libc/sysv/errfuns.h"
#include "libc/thread/posixthread.internal.h"
@ -85,9 +86,9 @@ textwindows int sys_execve_nt(const char *program, char *const argv[],
// launch the process
struct NtProcessInformation pi;
int rc =
ntspawn(program, argv, envp, (char *[]){fdspec, 0}, 0, 0, hParentProcess,
lpExplicitHandles, dwExplicitHandleCount, &si, &pi);
int rc = ntspawn(AT_FDCWD, program, argv, envp, (char *[]){fdspec, 0}, 0, 0,
hParentProcess, lpExplicitHandles, dwExplicitHandleCount,
&si, &pi);
__undescribe_fds(hParentProcess, lpExplicitHandles, dwExplicitHandleCount);
if (rc == -1) {
free(fdspec);