Fix some issues

This commit is contained in:
Justine Tunney 2023-10-09 20:18:48 -07:00
parent 211d5d902e
commit 9d372f48dd
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
29 changed files with 373 additions and 63 deletions

View file

@ -92,7 +92,6 @@ textwindows int sys_execve_nt(const char *program, char *const argv[],
if (rc == -1) {
free(fdspec);
CloseHandle(hParentProcess);
__undescribe_fds(hParentProcess, lpExplicitHandles, dwExplicitHandleCount);
_pthread_unlock();
__sig_unblock(m);
if (GetLastError() == kNtErrorSharingViolation) {
@ -104,8 +103,8 @@ textwindows int sys_execve_nt(const char *program, char *const argv[],
// give child to libc/proc/proc.c worker thread in parent
int64_t handle;
unassert(!DuplicateHandle(GetCurrentProcess(), pi.hProcess, hParentProcess,
&handle, 0, false, kNtDuplicateSameAccess));
unassert(DuplicateHandle(GetCurrentProcess(), pi.hProcess, hParentProcess,
&handle, 0, false, kNtDuplicateSameAccess));
unassert(!(handle & 0xFFFFFFFFFF000000));
TerminateThisProcess(0x23000000u | handle);
}