mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Make improvements
- Polyfill readlink("foo/") dir check on Windows - Support asynchronous signal delivery on Windows - Restore Windows Console from execve() daisy chain - Work around bug in AARCH64 Optimized Routines memcmp() - Disable unbourne.com shell completion on Windows for now - Don't always set virtual terminal input state on console - Remove Musl Libc's unusual preservation of realpath("//") - Make realpath() strongly link malloc() to pass configure test - Delete cosh.com shell, now that unbourne.com works on Windows!
This commit is contained in:
parent
f9c9a323fe
commit
425c055116
40 changed files with 581 additions and 706 deletions
|
@ -49,6 +49,7 @@ textwindows int __wsablock(struct Fd *fd, struct NtOverlapped *overlapped,
|
|||
// our i/o operation never happened because it failed
|
||||
return __winsockerr();
|
||||
}
|
||||
TryAgain:
|
||||
// our i/o operation is in flight and it needs to block
|
||||
abort_errno = EAGAIN;
|
||||
if (fd->flags & O_NONBLOCK) {
|
||||
|
@ -87,10 +88,15 @@ textwindows int __wsablock(struct Fd *fd, struct NtOverlapped *overlapped,
|
|||
// we wait for win32 to acknowledge that it's done using that memory.
|
||||
if (WSAGetOverlappedResult(fd->handle, overlapped, &got, true, flags)) {
|
||||
return got;
|
||||
} else if (WSAGetLastError() == kNtErrorOperationAborted) {
|
||||
errno = abort_errno;
|
||||
return -1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
switch (WSAGetLastError()) {
|
||||
case kNtErrorIoIncomplete:
|
||||
goto TryAgain;
|
||||
case kNtErrorOperationAborted:
|
||||
errno = abort_errno;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue