summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-10 18:28:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-10 18:28:48 (GMT)
commit024b92cb1e7bd2653beee2d010f1baf39010cacc (patch)
tree22cc01b1a590a7b665cab08e9f3cb7a5b5d67041 /unix
parentf1d34c1b20365bb0c18dcd30218760ea2e65d66b (diff)
downloadtcl-024b92cb1e7bd2653beee2d010f1baf39010cacc.zip
tcl-024b92cb1e7bd2653beee2d010f1baf39010cacc.tar.gz
tcl-024b92cb1e7bd2653beee2d010f1baf39010cacc.tar.bz2
[Bug 3541646] Don't panic on triggerPipe overrun
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixNotfy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 904c9db..42cc7be 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -340,7 +340,7 @@ Tcl_FinalizeNotifier(
*/
if (write(triggerPipe, "q", 1) != 1) {
- Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe");
+ Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe");
}
close(triggerPipe);
while(triggerPipe >= 0) {
@@ -879,8 +879,8 @@ Tcl_WaitForEvent(
waitingListPtr = tsdPtr;
tsdPtr->onList = 1;
- if (write(triggerPipe, "", 1) != 1) {
- Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe");
+ if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) {
+ Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe");
}
}
@@ -942,8 +942,8 @@ Tcl_WaitForEvent(
}
tsdPtr->nextPtr = tsdPtr->prevPtr = NULL;
tsdPtr->onList = 0;
- if (write(triggerPipe, "", 1) != 1) {
- Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe");
+ if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) {
+ Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe");
}
}