summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--unix/tclUnixNotfy.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b8e49a..704fd06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-10 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * unix/tclUnixNotfy.c: [Bug 3541646] Don't panic on triggerPipe overrun
+
2012-07-10 Donal K. Fellows <dkf@users.sf.net>
* win/tclWinSock.c (InitializeHostName): Corrected logic that
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");
}
}