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

cat CMakeLists.txt | grep hangs #175

Open
certik opened this issue Oct 3, 2024 · 4 comments
Open

cat CMakeLists.txt | grep hangs #175

certik opened this issue Oct 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@certik
Copy link
Contributor

certik commented Oct 3, 2024

~/repos/lfortran/integration_tests(main)$ cat CMakeLists.txt | grep
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
[hangs]

I don't have grep installed.

@certik certik added the bug Something isn't working label Oct 3, 2024
@wolfv
Copy link
Member

wolfv commented Oct 3, 2024

Image

Weird, on macOS it directly quits the cat when the command does not exist.

@certik
Copy link
Contributor Author

certik commented Oct 3, 2024

So usually it works:

~/repos/foo(main)$ cat README.md | foooasd
foooasd: command not found
~/repos/foo(main)$ cat README.md | grep
grep: command not found

But not on the particular file in LFortran:

~/repos/lfortran/integration_tests(main)$ cat CMakeLists.txt | grep
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C
Received Ctrl+C

The above is on another Windows computer. So this bug is definitely real.

@wolfv
Copy link
Member

wolfv commented Oct 3, 2024

And only hangs on Windows, yeah?

@certik
Copy link
Contributor Author

certik commented Oct 3, 2024

It hangs on Linux too (in WSL):

~/repos/lfortran/lfortran/integration_tests(main)$ cat CMakeLists.txt | grep
^CReceived Ctrl+C
^CReceived Ctrl+C

In there grep is available. In Bash on Linux I get:

ondrej@laptop:~/.../lfortran/integration_tests(main)$ cat CMakeLists.txt | grep
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants