mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:03:57 +08:00
Fix test hang when running under ninja
The psub tests create a fifo and launch a background job to write to it. However fifos have this obnoxious behavior where opening the file blocks until both sides are ready. In one of the tests we don't actually read from the fifo we create, so the background job hangs, and the tests never complete. Fix this by just reading from the fifo.
This commit is contained in:
parent
a2114233ac
commit
9907a8df4d
|
@ -12,6 +12,10 @@ rm $filename
|
|||
set -l filename (echo foo | psub --testing --fifo)
|
||||
test -p $filename
|
||||
or echo 'psub is not a fifo' >&2
|
||||
# hack: the background write that psub peforms may block
|
||||
# until someone opens the fifo for reading. So make sure we
|
||||
# actually read it.
|
||||
cat $filename > /dev/null
|
||||
rm $filename
|
||||
|
||||
cat (echo foo | psub)
|
||||
|
|
Loading…
Reference in New Issue
Block a user