You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hang when using <(..) which produes too much data #3817
<(...) is not doing what you think it's doing - it's a redirection from a command substitution (i.e. redirects standard input to the output of cat /dev/zero etc.
Ah, now I understand what's going on, (echo 1) is the same as 1, so <(echo 1) is the same as <1.
However, if I feed in something stupid, fish still shouldn't explode and swallow 16GB or ram or so (I've noticed even when I closed the terminal window, fish was still running in the background swallowing RAM) :) Is there any reason to bother reading more than the maximum length of a command line?
Is there any reason to bother reading more than the maximum length of a command line?
There is no such limit. However, in the same vein as issue #3712 to limit how much data read will consume, we should probably impose the same, or a similar, limit on the output of a command substitution.
Activity
zanchey commentedon Feb 6, 2017
<(...)is not doing what you think it's doing - it's a redirection from a command substitution (i.e. redirects standard input to the output ofcat /dev/zeroetc.You're looking for process substitution - see the psub builtin function.
ChrisJefferson commentedon Feb 6, 2017
Ah, so it behaves differently to bash (where my diff statement would have been correct). I was assuming it did the same thing as there.
ChrisJefferson commentedon Feb 6, 2017
Ah, now I understand what's going on,
(echo 1)is the same as1, so<(echo 1)is the same as<1.However, if I feed in something stupid, fish still shouldn't explode and swallow 16GB or ram or so (I've noticed even when I closed the terminal window, fish was still running in the background swallowing RAM) :) Is there any reason to bother reading more than the maximum length of a command line?
krader1961 commentedon Feb 7, 2017
There is no such limit. However, in the same vein as issue #3712 to limit how much data
readwill consume, we should probably impose the same, or a similar, limit on the output of a command substitution.