mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Make improvements
- Improved async signal safety of read() particularly for longjmp() - Started adding cancel cleanup handlers for locks / etc on Windows - Make /dev/tty work better particularly for uses like `foo | less` - Eagerly read console input into a linked list, so poll can signal - Fix some libc definitional bugs, which configure scripts detected
This commit is contained in:
parent
d6c2830850
commit
0c5dd7b342
85 changed files with 1062 additions and 671 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "libc/calls/sig.internal.h"
|
||||
#include "libc/calls/struct/timespec.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/nt/enum/wait.h"
|
||||
#include "libc/nt/enum/wsa.h"
|
||||
#include "libc/nt/errors.h"
|
||||
|
@ -113,6 +114,10 @@ BlockingOperation:
|
|||
if (WSAGetOverlappedResult(f->handle, overlapped, &got, nonblock, flags)) {
|
||||
rc = got;
|
||||
} else {
|
||||
if (_weaken(pthread_testcancel_np) &&
|
||||
(err = _weaken(pthread_testcancel_np)())) {
|
||||
return ecanceled();
|
||||
}
|
||||
rc = -1;
|
||||
err = WSAGetLastError();
|
||||
if (err == kNtErrorOperationAborted) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue