expect/unbuffer-child-flush-143963.patch
Jens Petersen 42f6009802 - fix flushing of unbuffer script (Charles Sullivan, #143963) with
unbuffer-child-flush-143963.patch (Don Libes)
- separate the examples scripts patches from the rest
2005-05-31 02:20:40 +00:00

23 lines
555 B
Diff

--- expect-5.43/example/unbuffer.orig 2004-01-25 10:37:49.000000000 +0900
+++ expect-5.43/example/unbuffer 2005-05-31 10:37:19.000000000 +0900
@@ -6,10 +6,17 @@
# pipeline
set stty_init "-echo"
eval spawn -noecho [lrange $argv 1 end]
- interact
+ close_on_eof -i $user_spawn_id 0
+ interact {
+ eof {
+ # flush remaining output from child
+ expect -timeout 1 -re .+
+ return
+ }
+ }
} else {
set stty_init "-opost"
- eval spawn -noecho $argv
set timeout -1
+ eval spawn -noecho $argv
expect
}