Skip to content

Commit

Permalink
tests: Try to fix exec2-3.2 on Windows
Browse files Browse the repository at this point in the history
On some mingw platforms exec2-3.2 isn't producing SIGPIPE
Try to make it do so.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
  • Loading branch information
msteveb committed Oct 16, 2017
1 parent 1fd4fb6 commit 9b4d8ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/exec2.test
Expand Up @@ -52,13 +52,13 @@ test exec2-3.1 "close pipeline return value" {
} {1 {child process exited abnormally} CHILDSTATUS 1}

test exec2-3.2 "close pipeline return value" -body {
set f [open "|echo abc | grep def | wc" ]
set bigstring [string repeat a 10000]
set f [open [list |cat << $bigstring]]
set rc [catch {close $f} msg opts]
lassign [dict get $opts -errorcode] status pid exitcode
list $rc $msg $status $exitcode
} -match glob -result {1 {child killed*} CHILDKILLED SIGPIPE}


test exec2-3.4 "wait for background task" {
set pid [exec sleep 0.1 &]
lassign [wait $pid] status newpid exitcode
Expand Down

0 comments on commit 9b4d8ec

Please sign in to comment.