summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_recvfrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_recvfrom.c')
-rw-r--r--lib/libc_r/uthread/uthread_recvfrom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_recvfrom.c b/lib/libc_r/uthread/uthread_recvfrom.c
index a3d6a7d..8d5d9db 100644
--- a/lib/libc_r/uthread/uthread_recvfrom.c
+++ b/lib/libc_r/uthread/uthread_recvfrom.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
+ * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,11 +50,13 @@ recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from, int *
/* Set the timeout: */
_thread_kern_set_timeout(NULL);
+ _thread_run->interrupted = 0;
_thread_kern_sched_state(PS_FDR_WAIT, __FILE__, __LINE__);
/* Check if the wait was interrupted: */
- if (errno == EINTR) {
+ if (_thread_run->interrupted) {
/* Return an error status: */
+ errno = EINTR;
ret = -1;
break;
}
OpenPOWER on IntegriCloud