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 Locks Shell #1032

Open
leath-dub opened this issue Sep 10, 2023 · 1 comment
Open

Process Substitution Locks Shell #1032

leath-dub opened this issue Sep 10, 2023 · 1 comment

Comments

@leath-dub
Copy link

This is easily reproducible even on the master branch run the following

ls <(echo hello)

This should just print a temp path, however It ends up locking the shell - only responding to Ctrl-c.

@theclapp
Copy link
Sponsor Collaborator

It's not completely broken. gosh appears to wait until something reads the FIFO it creates (whereas bash doesn't care). If you do that, it works:

$ cat <(echo .)
.

If you cat the FIFO in a different shell, that unblocks gosh:

<<<window 1>>>
$ ls -l <(echo .)
prw-r--r--@ 1 lmc  staff  0 Sep 16 11:35 /var/folders/9d/vt3kqx293xx8w3tn8m1jy_wc0000gn/T//sh-interp-12e05f50832eb231
<gosh blocks>

<<<window 2>>>
$ cat /var/folders/9d/vt3kqx293xx8w3tn8m1jy_wc0000gn/T//sh-interp-12e05f50832eb231
.
$

<<<window 1>>>
<gosh unblocks>
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants