mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Fix copy/paste issue in Windows console
This commit is contained in:
parent
bd48e6c666
commit
06c6baaf50
7 changed files with 30 additions and 37 deletions
|
@ -91,7 +91,8 @@ textwindows void __sig_delete(int sig) {
|
|||
BLOCK_SIGNALS;
|
||||
_pthread_lock();
|
||||
for (e = dll_last(_pthread_list); e; e = dll_prev(_pthread_list, e)) {
|
||||
POSIXTHREAD_CONTAINER(e)->tib->tib_sigpending &= ~(1ull << (sig - 1));
|
||||
atomic_fetch_and_explicit(&POSIXTHREAD_CONTAINER(e)->tib->tib_sigpending,
|
||||
~(1ull << (sig - 1)), memory_order_relaxed);
|
||||
}
|
||||
_pthread_unlock();
|
||||
ALLOW_SIGNALS;
|
||||
|
@ -157,7 +158,8 @@ static textwindows bool __sig_start(struct PosixThread *pt, int sig,
|
|||
}
|
||||
if (pt->tib->tib_sigmask & (1ull << (sig - 1))) {
|
||||
STRACE("enqueing %G on %d", sig, _pthread_tid(pt));
|
||||
pt->tib->tib_sigpending |= 1ull << (sig - 1);
|
||||
atomic_fetch_or_explicit(&pt->tib->tib_sigpending, 1ull << (sig - 1),
|
||||
memory_order_relaxed);
|
||||
return false;
|
||||
}
|
||||
if (*rva == (intptr_t)SIG_DFL) {
|
||||
|
@ -339,7 +341,8 @@ static int __sig_killer(struct PosixThread *pt, int sig, int sic) {
|
|||
!((uintptr_t)__executable_start <= nc.Rip &&
|
||||
nc.Rip < (uintptr_t)__privileged_start)) {
|
||||
STRACE("enqueing %G on %d rip %p", sig, _pthread_tid(pt), nc.Rip);
|
||||
pt->tib->tib_sigpending |= 1ull << (sig - 1);
|
||||
atomic_fetch_or_explicit(&pt->tib->tib_sigpending, 1ull << (sig - 1),
|
||||
memory_order_relaxed);
|
||||
ResumeThread(th);
|
||||
__sig_cancel(pt, sig, flags);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue