Use %gs as TLS register when dlopen() is linked

Fixes #938
This commit is contained in:
Justine Tunney 2023-11-08 01:11:17 -08:00
parent e961385e55
commit d71da7fc72
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 71 additions and 40 deletions

View file

@ -723,6 +723,7 @@ static textwindows int WaitForConsole(struct Fd *f, sigset_t waitmask) {
int sig;
int64_t sem;
uint32_t wi, ms = -1;
int handler_was_called;
if (!__ttyconf.vmin) {
if (!__ttyconf.vtime) {
return 0; // non-blocking w/o raising eagain
@ -745,7 +746,7 @@ static textwindows int WaitForConsole(struct Fd *f, sigset_t waitmask) {
if (wi != 1) return __winerr(); // wait failed
if (!(sig = __sig_get(waitmask))) return eintr();
DeliverSignal:
int handler_was_called = __sig_relay(sig, SI_KERNEL, waitmask);
handler_was_called = __sig_relay(sig, SI_KERNEL, waitmask);
if (_check_cancel() == -1) return -1;
if (!(handler_was_called & SIG_HANDLED_NO_RESTART)) return -2;
return eintr();