+2001-09-11 Ulrich Drepper <drepper@redhat.com>
+
+ * nscd/nscd_gethst_r.c: Don't expect IPv6 addresses for IPv4 lookup.
+ Patch by Stephan Kulow.
+
2001-09-08 Ben Collins <bcollins@debian.org>
* sysdeps/arm/dl-machine.h (elf_machine_rel): Fix thinko in
+2001-09-11 Ulrich Drepper <drepper@redhat.com>
+ Wolfram Gloger <wg@malloc.de>
+
+ * join.c: Protect all communications from and to manager with
+ TEMP_FAILURE_RETRY.
+ * manager.c: Likewise.
+ * pthread.c: Likewise.
+ * smeaphore.c: Likewise.
+
2001-08-29 Ulrich Drepper <drepper@redhat.com>
* spinlock.c (__pthread_lock): Top max_count value with
if (self == __pthread_main_thread && __pthread_manager_request >= 0) {
request.req_thread = self;
request.req_kind = REQ_MAIN_THREAD_EXIT;
- __libc_write(__pthread_manager_request, (char *)&request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *)&request, sizeof(request)));
suspend(self);
/* Main thread flushes stdio streams and runs atexit functions.
It also calls a handler within LinuxThreads which sends a process exit
request.req_thread = self;
request.req_kind = REQ_FREE;
request.req_args.free.thread_id = thread_id;
- __libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
}
return 0;
}
request.req_thread = thread_self();
request.req_kind = REQ_FREE;
request.req_args.free.thread_id = thread_id;
- __libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
}
return 0;
}
/* Raise our priority to match that of main thread */
__pthread_manager_adjust_prio(__pthread_main_thread->p_priority);
/* Synchronize debugging of the thread manager */
- n = __libc_read(reqfd, (char *)&request, sizeof(request));
+ n = TEMP_FAILURE_RETRY(__libc_read(reqfd, (char *)&request,
+ sizeof(request)));
ASSERT(n == sizeof(request) && request.req_kind == REQ_DEBUG);
ufd.fd = reqfd;
ufd.events = POLLIN;
}
/* Read and execute request */
if (n == 1 && (ufd.revents & POLLIN)) {
- n = __libc_read(reqfd, (char *)&request, sizeof(request));
- ASSERT(n == sizeof(request));
+ n = TEMP_FAILURE_RETRY(__libc_read(reqfd, (char *)&request,
+ sizeof(request)));
+#ifdef DEBUG
+ if (n < 0) {
+ char d[64];
+ write(STDERR_FILENO, d, snprintf(d, sizeof(d), "*** read err %m\n"));
+ } else if (n != sizeof(request)) {
+ write(STDERR_FILENO, "*** short read in manager\n", 26);
+ }
+#endif
+
switch(request.req_kind) {
case REQ_CREATE:
request.req_thread->p_retcode =
if (__pthread_threads_debug && __pthread_sig_debug > 0) {
request.req_thread = self;
request.req_kind = REQ_DEBUG;
- __libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
suspend(self);
}
/* Run the thread code */
struct pthread_request request;
request.req_thread = 0;
request.req_kind = REQ_KICK;
- __libc_write(__pthread_manager_request, (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
}
}
}
/* Synchronize debugging of the thread manager */
request.req_kind = REQ_DEBUG;
- __libc_write(__pthread_manager_request, (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
return 0;
}
request.req_args.create.arg = arg;
sigprocmask(SIG_SETMASK, (const sigset_t *) NULL,
&request.req_args.create.mask);
- __libc_write(__pthread_manager_request, (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
suspend(self);
retval = THREAD_GETMEM(self, p_retcode);
if (__builtin_expect (retval, 0) == 0)
request.req_thread = self;
request.req_kind = REQ_PROCESS_EXIT;
request.req_args.exit.code = retcode;
- __libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
suspend(self);
/* Main thread should accumulate times for thread manager and its
children, so that timings for main thread account for all threads. */
va_start(args, fmt);
vsnprintf(buffer + 8, sizeof(buffer) - 8, fmt, args);
va_end(args);
- __libc_write(2, buffer, strlen(buffer));
+ TEMP_FAILURE_RETRY(__libc_write(2, buffer, strlen(buffer)));
}
#endif
}
request.req_kind = REQ_POST;
request.req_args.post = sem;
- __libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request));
+ TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
+ (char *) &request, sizeof(request)));
}
return 0;
}
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
vec[2].iov_base = cp;
vec[2].iov_len = hst_resp.h_addr_list_cnt * INADDRSZ;
- ignore = alloca (hst_resp.h_addr_list_cnt * IN6ADDRSZ);
- vec[3].iov_base = ignore;
- vec[3].iov_len = hst_resp.h_addr_list_cnt * IN6ADDRSZ;
-
for (cnt = 0; cnt < hst_resp.h_addr_list_cnt; ++cnt)
{
resultbuf->h_addr_list[cnt] = cp;
resultbuf->h_addrtype = AF_INET;
resultbuf->h_length = INADDRSZ;
- total_len += hst_resp.h_addr_list_cnt * (INADDRSZ + IN6ADDRSZ);
+ total_len += hst_resp.h_addr_list_cnt * INADDRSZ;
- n = 4;
+ n = 3;
}
else
{