diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-07-10 18:28:48 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-07-10 18:28:48 (GMT) |
commit | ea0fa0400aa11a8f79f450ef7cf948f92fe35dce (patch) | |
tree | 22cc01b1a590a7b665cab08e9f3cb7a5b5d67041 /unix | |
parent | 00692368ae1f7db34c57be1eee0de6df073985d7 (diff) | |
download | tcl-ea0fa0400aa11a8f79f450ef7cf948f92fe35dce.zip tcl-ea0fa0400aa11a8f79f450ef7cf948f92fe35dce.tar.gz tcl-ea0fa0400aa11a8f79f450ef7cf948f92fe35dce.tar.bz2 |
[Bug 3541646] Don't panic on triggerPipe overrun
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixNotfy.c | 10 |
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"); } } |