mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +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
|
@ -19,6 +19,7 @@
|
|||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/sig.internal.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
|
@ -33,7 +34,9 @@ textwindows int _check_interrupts(int sigops) {
|
|||
goto Interrupted;
|
||||
}
|
||||
if (_weaken(__sig_check) && (status = _weaken(__sig_check)())) {
|
||||
STRACE("syscall interrupted (status=%d, sigops=%d)", status, sigops);
|
||||
if (status == 2 && (sigops & kSigOpRestartable)) {
|
||||
STRACE("restarting system call");
|
||||
return 0;
|
||||
}
|
||||
err = EINTR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue