summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unixFCmd.test26
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index 41b9bc7..e8f997d 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -92,13 +92,25 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} {
set result
} {1}
test unixFCmd-1.8 {Checking EINTR Bug} {
- global gotsig
- set gotsig 0
- testalarm {set gotsig 1}
- for {set i 0} {$i < 500000} {incr i} {}
- return $gotsig
-} {1}
-catch {unset gotsig}
+ testalarm
+ after 2000
+ list [testgotsig] [testgotsig]
+} {1 0}
+test unixFCmd-1.9 {Checking EINTR Bug} {
+ cleanup
+ set f [open tfalarm w]
+ puts $f {
+ after 2000
+ puts "hello world"
+ exit 0
+ }
+ close $f
+ testalarm
+ set pipe [open "|[info nameofexecutable] tfalarm" r+]
+ set line [read $pipe 1]
+ catch {close $pipe}
+ list $line [testgotsig]
+} {h 1}
test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} {
cleanup
exec touch tf1