summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r--unix/tclUnixNotfy.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 2574015..dba5bd3 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixNotfy.c,v 1.32 2006/08/21 01:08:03 das Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.33 2008/02/28 20:12:09 jenglish Exp $
*/
#include "tclInt.h"
@@ -918,25 +918,12 @@ NotifierThreadProc(
receivePipe = fds[0];
-#ifndef USE_FIONBIO
- status = fcntl(receivePipe, F_GETFL);
- status |= O_NONBLOCK;
- if (fcntl(receivePipe, F_SETFL, status) < 0) {
+ if (TclUnixSetBlockingMode(receivePipe, TCL_MODE_NONBLOCKING) < 0) {
Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking");
}
- status = fcntl(fds[1], F_GETFL);
- status |= O_NONBLOCK;
- if (fcntl(fds[1], F_SETFL, status) < 0) {
+ if (TclUnixSetBlockingMode(fds[1], TCL_MODE_NONBLOCKING) < 0) {
Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking");
}
-#else
- if (ioctl(receivePipe, (int) FIONBIO, &status) < 0) {
- Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking");
- }
- if (ioctl(fds[1], (int) FIONBIO, &status) < 0) {
- Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking");
- }
-#endif /* FIONBIO */
/*
* Install the write end of the pipe into the global variable.