mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 14:52:28 +00:00
Rewrite special file handling on Windows
This change gets GNU grep working. What caused it to not work, is it wouldn't write to an output file descriptor when its dev/ino equaled /dev/null's. So now we invent special dev/ino values for these files
This commit is contained in:
parent
aca2261cda
commit
2db2f40a98
53 changed files with 485 additions and 299 deletions
|
@ -67,10 +67,8 @@
|
|||
#include "libc/thread/itimer.internal.h"
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
#include "libc/thread/tls.h"
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
extern int64_t __wincrashearly;
|
||||
void __keystroke_wipe(void);
|
||||
|
||||
static textwindows wontreturn void AbortFork(const char *func) {
|
||||
|
@ -399,7 +397,7 @@ textwindows int sys_fork_nt(uint32_t dwCreationFlags) {
|
|||
__tls_enabled_set(true);
|
||||
// clear pending signals
|
||||
tib->tib_sigpending = 0;
|
||||
__sig.pending = 0;
|
||||
atomic_store_explicit(&__sig.pending, 0, memory_order_relaxed);
|
||||
// re-enable threads
|
||||
__enable_threads();
|
||||
// re-apply code morphing for function tracing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue