-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Error: filedescriptor out of range in select() #356
Comments
@zhangyafeikimi yes, show the patch please and I will try to merge it |
https://gist.github.com/zhangyafeikimi/988ccc8bd6c534b129e433f6eba9cd2e @amoffat , It is a demo for you. |
sorry for bothering, timeout for poll should be 100, the unit is milliseconds, while it is seconds for select. |
Good observation @zhangyafeikimi |
looking forward to the fix |
@amoffat any progress? if no, need my help? |
@zhangyafeikimi I could use some help actually. Here's what I have so far. I'm trying to write a function, One test that is interesting is FunctionalTests.test_general_signal. You can run it with:
Anyways, it fails with an interesting error:
The reason why it is failing in this way is that the IO events here only occur when the process finishes, not as the subprocess writes to stdout, even though I am watching I haven't figured it out yet, so any insight you have will be useful. I did some very shallow digging and found this bug report, which leads me to believe that |
Hmm, I got your code design. Don't worry about "Broken poll on MacOS", it's been fixed so far. By the way, I provide a test case for this issue:
|
Alright your fix is live @zhangyafeikimi. Good work |
* bugfix for file descriptors over 1024 [#356](amoffat/sh#356) * bugfix when `_err_to_out` is True and `_out` is pipe or tty [#365](amoffat/sh#365)
When my process opened too many files and fd number > 1024, this error may occur.
So, the solution is that sh.py should use poll instead of select.
All posix os have poll now.
I have a patch, however, it is based on previous sh.py. I will show it if you are interesting.
The text was updated successfully, but these errors were encountered: