diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:59:34 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:59:34 +0000 |
| commit | 4a027d50c7f3f30178a89b3159ba9e4b44f06885 (patch) | |
| tree | b7a4ea836e97e11d436f9a6657ea6a9ec8036c33 /lib/libpthread/thread/thr_select.c | |
| parent | ccf47cfcedf9f3db1780bc3b52ca0adb4480d3f6 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_select.c')
| -rw-r--r-- | lib/libpthread/thread/thr_select.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c index 7db3ed2f2444..96df9c19bf54 100644 --- a/lib/libpthread/thread/thr_select.c +++ b/lib/libpthread/thread/thr_select.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 @@ -125,8 +125,13 @@ select(int numfds, fd_set * readfds, fd_set * writefds, memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds)); } _thread_run->data.select_data = &data; + _thread_run->interrupted = 0; _thread_kern_sched_state(PS_SELECT_WAIT, __FILE__, __LINE__); - ret = data.nfds; + if (_thread_run->interrupted) { + errno = EINTR; + ret = -1; + } else + ret = data.nfds; } } /* clean up the locks */ |
