Tcl Source Code

Check-in [2745684dbf]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed race condition in test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-1-branch-old
Files: files | file ages | folders
SHA1: 2745684dbf0819661f31244794787de679094e85
User & Date: stanton 1999-04-06 20:40:22
Context
1999-04-06
20:59
Adjusted error reporting in TclpRename to better handle common error condition on IRIX. The change... check-in: b03aba6368 user: rjohnson tags: core-8-1-branch-old
20:40
Fixed race condition in test. check-in: 2745684dbf user: stanton tags: core-8-1-branch-old
20:39
Added knownBug tag to test that in known to fail (Bug: 1737) check-in: 6985e168ac user: surles tags: core-8-1-branch-old
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ChangeLog.

     1      1   1999-04-06    <[email protected]>
     2         -
            2  +	
            3  +	* tests/unixInit.test: Fixed race condition in test.
            4  +	
     3      5   	* tests/unixInit.test: 
     4      6   	* tests/fileName.test: Minor test nits.
     5      7   
     6      8   	* unix/tclUnixInit.c (TclpSetInitialEncodings): Fixed bad initial
     7      9   	encoding string.
     8     10   
     9     11   1999-04-06    <[email protected]>

Changes to tests/unixInit.test.

     6      6   #
     7      7   # Copyright (c) 1997 by Sun Microsystems, Inc.
     8      8   # Copyright (c) 1998-1999 by Scriptics Corporation.
     9      9   #
    10     10   # See the file "license.terms" for information on usage and redistribution
    11     11   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12     12   #
    13         -# RCS: @(#) $Id: unixInit.test,v 1.1.2.8 1999/04/06 20:21:26 stanton Exp $
           13  +# RCS: @(#) $Id: unixInit.test,v 1.1.2.9 1999/04/06 20:40:23 stanton Exp $
    14     14   
    15     15   if {[lsearch [namespace children] ::tcltest] == -1} {
    16     16       source [file join [pwd] [file dirname [info script]] defs.tcl]
    17     17   }
    18     18   
    19     19   catch {set oldlibrary $env(TCL_LIBRARY); unset env(TCL_LIBRARY)}
    20     20   catch {set oldlang $env(LANG)}
................................................................................
    31     31   } else {
    32     32       set ::tcltest::testConfig(installedTcl) 1
    33     33   }
    34     34   
    35     35   test unixInit-1.1 {TclpInitPlatform: ignore SIGPIPE} {unixOnly installedTcl} {
    36     36       set x {}
    37     37   
           38  +    # Watch out for a race condition here.  If tcltest is too slow to start
           39  +    # then we'll kill it before it has a chance to set up its signal handler.
           40  +    
    38     41       set f [open "|[list $tcltest]" w+]
           42  +    puts $f "puts hi"
           43  +    flush $f
           44  +    gets $f
    39     45       exec kill -PIPE [pid $f]
    40     46       lappend x [catch {close $f}]
    41     47   
    42     48       set f [open "|[list $tcltest]" w+]
           49  +    puts $f "puts hi"
           50  +    flush $f
           51  +    gets $f
    43     52       exec kill [pid $f]
    44     53       lappend x [catch {close $f}]
    45     54   
    46     55       set x
    47     56   } {0 1}
    48     57   
    49     58   proc getlibpath "{program [list $tcltest]}" {