diff options
author | hobbs <hobbs> | 2004-02-17 23:50:38 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-02-17 23:50:38 (GMT) |
commit | 9c40be080e14950efdca421aea648fc80664787d (patch) | |
tree | 13073fc7f4d5e3dedde22bac361daff703a1eebd /tests/unixInit.test | |
parent | a09e7d11eb23fc3178525780675d000298e8ccff (diff) | |
download | tcl-9c40be080e14950efdca421aea648fc80664787d.zip tcl-9c40be080e14950efdca421aea648fc80664787d.tar.gz tcl-9c40be080e14950efdca421aea648fc80664787d.tar.bz2 |
* tests/unixInit.test (unixInit-7.1):
* unix/tclUnixInit.c (TclpInitPlatform): ensure the std fds exist
to prevent crash condition [Bug #772288]
Diffstat (limited to 'tests/unixInit.test')
-rw-r--r-- | tests/unixInit.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/unixInit.test b/tests/unixInit.test index 4ec31a5..9780738 100644 --- a/tests/unixInit.test +++ b/tests/unixInit.test @@ -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: unixInit.test,v 1.31 2003/11/05 20:50:44 dgp Exp $ +# RCS: @(#) $Id: unixInit.test,v 1.32 2004/02/17 23:50:39 hobbs Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -353,6 +353,19 @@ test unixInit-5.1 {Tcl_Init} {emptyTest unixOnly} { test unixInit-6.1 {Tcl_SourceRCFile} {emptyTest unixOnly} { } {} +test unixInit-7.1 {closed standard channel: Bug 772288} -body { + set tclsh [interpreter] + makeFile {puts [open /dev/null]} crash.tcl + makeFile [subst -nocommands { + close stdin + exec $tclsh crash.tcl + }] crashtest.tcl + exec $tclsh crashtest.tcl +} -cleanup { + removeFile crash.tcl + removeFile crashtest.tcl +} -returnCodes 0 + # cleanup if {[info exists oldlibrary]} { set env(TCL_LIBRARY) $oldlibrary |