summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r--unix/tclUnixNotfy.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index edcd884..3be0bb9 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.39 2009/04/10 18:02:37 das Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.40 2009/12/16 23:26:00 nijtmans Exp $
*/
#include "tclInt.h"
@@ -291,7 +291,9 @@ Tcl_FinalizeNotifier(
* processes had terminated. [Bug: 4139] [Bug: 1222872]
*/
- write(triggerPipe, "q", 1);
+ if (write(triggerPipe, "q", 1) != 1) {
+ Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe");
+ }
close(triggerPipe);
while(triggerPipe >= 0) {
Tcl_ConditionWait(&notifierCV, &notifierMutex, NULL);
@@ -782,7 +784,9 @@ Tcl_WaitForEvent(
waitingListPtr = tsdPtr;
tsdPtr->onList = 1;
- write(triggerPipe, "", 1);
+ if (write(triggerPipe, "", 1) != 1) {
+ Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe");
+ }
}
FD_ZERO(&(tsdPtr->readyMasks.readable));
@@ -812,7 +816,9 @@ Tcl_WaitForEvent(
}
tsdPtr->nextPtr = tsdPtr->prevPtr = NULL;
tsdPtr->onList = 0;
- write(triggerPipe, "", 1);
+ if (write(triggerPipe, "", 1) != 1) {
+ Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe");
+ }
}
#else