Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process substitution with fifo doesn't work as expected #7174

Closed
rmccampbell opened this issue Jul 3, 2020 · 1 comment
Closed

Process substitution with fifo doesn't work as expected #7174

rmccampbell opened this issue Jul 3, 2020 · 1 comment

Comments

@rmccampbell
Copy link

fish version: 3.1.2
OS: Windows 10 WSL, Ubuntu 18.04.2 (Also tried it on a real linux box via SSH)

When I try using the process substitution command psub with the --fifo option, I expect that it will not block and allow the main command to execute while the subprocess is still generating output. Instead it buffers the output and only executes the main command once the subprocess ends. Example:

function cmd
    sleep 1; echo a
    sleep 1; echo b
    sleep 1; echo c
end

cmd
cat (cmd | psub --fifo)

I expect that the command with process substitution should echo each line with a 1 second delay, as the raw function does. This is the behavior in bash with cat <(cmd). Instead it waits 3 seconds and echoes all three lines at once.

@faho
Copy link
Member

faho commented Jul 4, 2020

Duplicate of #1040

@faho faho marked this as a duplicate of #1040 Jul 4, 2020
@faho faho closed this as completed Jul 4, 2020
@faho faho added the duplicate label Jul 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants