diff options
Diffstat (limited to 'src/Fl_lock.cxx')
| -rw-r--r-- | src/Fl_lock.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index 27787cd99..39d9a8368 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -304,7 +304,7 @@ static void unlock_function_rec() { # endif // PTHREAD_MUTEX_RECURSIVE void Fl::awake(void* msg) { - write(thread_filedes[1], &msg, sizeof(void*)); + if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ } } static void* thread_message_; @@ -315,7 +315,9 @@ void* Fl::thread_message() { } static void thread_awake_cb(int fd, void*) { - read(fd, &thread_message_, sizeof(void*)); + if (read(fd, &thread_message_, sizeof(void*))==0) { + /* This should never happen */ + } Fl_Awake_Handler func; void *data; while (Fl::get_awake_handler_(func, data)==0) { @@ -331,7 +333,9 @@ void Fl::lock() { if (!thread_filedes[1]) { // Initialize thread communication pipe to let threads awake FLTK // from Fl::wait() - pipe(thread_filedes); + if (pipe(thread_filedes)==-1) { + /* this should not happen */ + } // Make the write side of the pipe non-blocking to avoid deadlock // conditions (STR #1537) |
