Commit Graph

1 Commits (417e408f596cbf48503f2240b8e2b9a97ed05d51)

Author SHA1 Message Date
Sam Doran a259d79ad6
[stable-2.9] Fix filedescriptor out of range in select() when running commands (#65058) (#69517)
* Fix filedescriptor out of range in select() when running commands

* Simplify the run_command() code

Now that we're using selectors in run_command(), we can simplify some of
the code.

* Use fileobj.read() instead of os.read()
* No longer use get_buffer_size() as we can just slurp all of the data
  instead.

Also use a simpler conditional check of whether the selector map is
empty

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>.
(cherry picked from commit f200487414)

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
5 years ago