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

stderr is redirected to /dev/null ocassionally #3

Open
laggardkernel opened this issue Nov 7, 2019 · 2 comments
Open

stderr is redirected to /dev/null ocassionally #3

laggardkernel opened this issue Nov 7, 2019 · 2 comments

Comments

@laggardkernel
Copy link
Owner

No stderr output is displayed in the shell sometimes. It is probably an upstream bug in mafredri/zsh-async. Stderr is redirected by exec 2>/dev/null in function _async_worker within async.zsh.

https://github.com/mafredri/zsh-async/blob/95c2b1577f455728ec01cec001a86c216d0af2bd/async.zsh#L67-L71

@laggardkernel
Copy link
Owner Author

Seems a known and fixed bug in zsh-async#35. But in my former experience, remove exec 2>/dev/null may not be enough, the stderr is still lost sometime after computer wakeup. Let's update zsh-async and wait for later test.

@laggardkernel
Copy link
Owner Author

laggardkernel commented May 2, 2021

Still no idea why remove exec 2>/dev/null within zsh-async is not enough. After such a long time, I found a way to trigger this bug 100% at last.

Run go test on https://github.com/quii/learn-go-with-tests/tree/master/select/v3, and switch to another dir. fd 2 will be redirected to /dev/stderr every time I try this.

I'll just redirect fd 2 back after calling async_stop_worker.

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