scummvm random work
[patches.git] / uclibc-pt-manager.patch
CommitLineData
5e993f12 1--- uClinux-dist/uClibc/libpthread/linuxthreads/manager.c
2+++ uClinux-dist/uClibc/libpthread/linuxthreads/manager.c
3@@ -195,9 +195,15 @@
4 {
5
6 PDEBUG("before __libc_read\n");
7- n = __libc_read(reqfd, (char *)&request, sizeof(request));
8+ n = TEMP_FAILURE_RETRY(__libc_read(reqfd, (char *)&request, sizeof(request)));
9 PDEBUG("after __libc_read, n=%d\n", n);
10- ASSERT(n == sizeof(request));
11+ if (n < 0) {
12+ char d[64];
13+ write(STDERR_FILENO, d, snprintf(d, sizeof(d), "*** read err %m\n"));
14+ } else if (n != sizeof(request)) {
15+ write(STDERR_FILENO, "*** short read in manager\n", 26);
16+ }
17+
18 switch(request.req_kind) {
19 case REQ_CREATE:
20 PDEBUG("got REQ_CREATE\n");