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

Crash when combining pipe and redirection #1844

Open
1 task done
hanche opened this issue Sep 27, 2024 · 0 comments
Open
1 task done

Crash when combining pipe and redirection #1844

hanche opened this issue Sep 27, 2024 · 0 comments

Comments

@hanche
Copy link
Contributor

hanche commented Sep 27, 2024

What happened, and what did you expect to happen?

Elvish crashes when I run this command:

nop | nop < /dev/null

While the double redirection of stdin would clearly be a mistake, a crash is not the expected outcome. Instead, I would expect either an error message or that the second command in the pipeline gets its input either from the pipe or the named pipe. (I discovered this by wondering what would happen – the code above distills my test down to the bare minimum.)

Incidentally, nop | { nop < /dev/null } does not result in a crash, I presume since the ambiguity is now removed by the syntax.

I attach the crash output, on the off chance that others can't reproduce the crash.

crash.txt

Output of "elvish -version"

0.21.0-dev.0.20240809001233-bc247bb5e17c-dirty

Code of Conduct

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

1 participant