diff options
author | Roland McGrath <roland@gnu.org> | 1995-08-31 00:02:32 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-08-31 00:02:32 +0000 |
commit | a993273c0d4d1907028adee7a2ae012826fd316c (patch) | |
tree | 3b1f5f64ea2b79fff7a61283d1ae60ac9291f38f /sysdeps | |
parent | 18926cf415b65008c849b592209a85f733be39f7 (diff) | |
download | glibc-a993273c0d4d1907028adee7a2ae012826fd316c.zip glibc-a993273c0d4d1907028adee7a2ae012826fd316c.tar.gz glibc-a993273c0d4d1907028adee7a2ae012826fd316c.tar.bz2 |
Wed Aug 30 16:44:55 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/mach/hurd/select.c: Deal with out of order replies
during io_select request loop.
Handle MACH_RCV_TIMED_OUT error from requests.
* hurd/intr-msg.c: If the user passed the MACH_RCV_TIMEOUT option,
distinguish MACH_RCV_TIMED_OUT from EINTR.
* posix/glob.c (glob): Use realloc to extend strings for GLOB_MARK
slash.
(glob_in_dir): Don't allocate extra byte here.
* sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
Decrement the DT_RELSZ value for the skipped reloc.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/dl-machine.h | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/select.c | 33 |
2 files changed, 29 insertions, 5 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 57637a9..d509e08 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -66,6 +66,7 @@ elf_machine_load_address (void) we skip it to avoid trying to modify read-only text in this early stage. */ #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ ++(const Elf32_Rel *) (dynamic_info)[DT_REL]->d_un.d_ptr; + (dynamic_info)[DT_RELSZ]->d_un.d_val -= sizeof (Elf32_Rel); /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ diff --git a/sysdeps/mach/hurd/select.c b/sysdeps/mach/hurd/select.c index d1c5913..434cfbb 100644 --- a/sysdeps/mach/hurd/select.c +++ b/sysdeps/mach/hurd/select.c @@ -121,16 +121,39 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout), if (!err) { int tag = i; + int type = types[i]; err = __io_select (ports[i], port, /* Poll for each but the last. */ (i == lastfd && got == 0) ? to : 0, - &types[i], &tag); - if (!err) + &type, &tag); + switch (err) { - if (tag != i) + case MACH_RCV_TIMED_OUT: + /* No immediate response. This is normal. */ + err = 0; + break; + + case 0: + /* We got an answer. This is not necessarily the answer to + the query we sent just now. It may correspond to any + prior query which timed out before its answer arrived. */ + if (tag < 0 || tag > i || + (type & (SELECT_READ|SELECT_URG|SELECT_WRITE)) == 0) + /* This is not a proper answer to any query we have yet + made. */ err = EGRATUITOUS; - else if (types[i] & (SELECT_READ|SELECT_URG|SELECT_WRITE)) - ++got; + else + { + /* Some port is ready. TAG tells us which. */ + types[tag] &= type; + ++got; + } + break; + + default: + /* Any other error kills us. + But we must continue to loop to free the ports. */ + break; } } _hurd_port_free (&cells[i]->port, &ulink[i], ports[i]); |