aboutsummaryrefslogtreecommitdiffstats
path: root/lang/tclX/files
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2009-11-27 15:20:34 +0800
committermi <mi@FreeBSD.org>2009-11-27 15:20:34 +0800
commit0370c7a94b5733594648fa4cf971f367405a1c17 (patch)
treea7dd6634c1689723d26b443f4837cfac0b56a095 /lang/tclX/files
parent429d87c52ef68114435b052982353b89cf04e258 (diff)
downloadfreebsd-ports-gnome-0370c7a94b5733594648fa4cf971f367405a1c17.tar.gz
freebsd-ports-gnome-0370c7a94b5733594648fa4cf971f367405a1c17.tar.zst
freebsd-ports-gnome-0370c7a94b5733594648fa4cf971f367405a1c17.zip
At some point a change in Tcl's core (in both 8.5 and 8.4) resulted
in an unintended call to write ZERO bytes to any descriptor, that was opened for writing, when closing it. When the descriptor belongs to a pipe, with its other end closed -- such as when the started process has exited, doing so results in a SIGPIPE. Tcl's core ignores SIGPIPEs, but TclX' self-tests didn't and began to fail. The bug should now be fixed in Tcl, but this patch is needed for TclX to pass its own tests even when using the uncorrected version of Tcl.
Diffstat (limited to 'lang/tclX/files')
-rw-r--r--lang/tclX/files/patch-signal-test32
1 files changed, 32 insertions, 0 deletions
diff --git a/lang/tclX/files/patch-signal-test b/lang/tclX/files/patch-signal-test
new file mode 100644
index 000000000000..ffe4c1003dc1
--- /dev/null
+++ b/lang/tclX/files/patch-signal-test
@@ -0,0 +1,32 @@
+--- tests/signal.test 2002-04-02 21:44:21.000000000 -0500
++++ tests/signal.test 2009-11-26 12:19:20.000000000 -0500
+@@ -329,5 +329,5 @@
+ echo Notice: restarting of interrupted system calls is not available on this system.
+ } else {
+- test signal-3.0 {kill tests} {
++ Test signal-3.0 {kill tests} {
+ # Start program on a pipe, but don't doing anything until we send it
+ # something to make timing issues smaller.
+@@ -346,5 +346,14 @@
+ set resp [gets $sp]
+ } {} {
+- catch {close $sp}
++ signal -restart error SIGPIPE
++ if {[catch {close $sp} e]} {
++ if {$e == "SIGPIPE signal received"} {
++ puts stderr "$e while closing $sp. This Tcl bug is fixed in recent 8.4 and 8.5 releases"
++ } else {
++ puts stderr "Unexpected error $e while closing $sp."
++ append resp - $e
++ }
++ }
++ signal default SIGPIPE
+ alarm 0
+ }
+@@ -353,5 +362,5 @@
+ # Note this this is somewhat timing dependent and might fail
+ # on a heavly loaded system.
+- } {HELLO 1}
++ } 0 {HELLO 1}
+ }
+