histfile tests: tweak expect commands to avoid crash on 32-bit platforms

Rather than killing the process with close, read EOF after sending the
"exit" command and wait for OS cleanup (per the expect examples).

Not cleaning up with wait caused expect to crash on all 32-bit platforms
including i586 and armv7l with "alloc: invalid block: 0xbf993ccb: 3d 3b".

64-bit platforms were not affected, for reasons that are not clear.
This commit is contained in:
David Adam 2019-01-05 15:59:25 +08:00
parent 4f196eef64
commit 2c01e67a74

View File

@ -92,7 +92,8 @@ expect_prompt -re "\r\n$hist_line\r\n" {
# ============= # =============
# Start by shutting down the previous shell. # Start by shutting down the previous shell.
send "exit\r" send "exit\r"
close $spawn_id expect eof
wait
# Set the fish_history env var. # Set the fish_history env var.
set ::env(fish_history) env set ::env(fish_history) env