(parent, p, fd, data, max_read_bytes, sid)
| 257 | |
| 258 | |
| 259 | def non_windows_platform(parent, p, fd, data, max_read_bytes, sid): |
| 260 | while p and p.poll() is None: |
| 261 | if request.sid in app.config['sessions']: |
| 262 | # This code is added to make this unit testable. |
| 263 | if "is_test" not in data: |
| 264 | sio.sleep(0.01) |
| 265 | else: |
| 266 | data['count'] += 1 |
| 267 | if data['count'] == 5: |
| 268 | break |
| 269 | |
| 270 | timeout = 0 |
| 271 | # module provides access to platform-specific I/O |
| 272 | # monitoring functions |
| 273 | try: |
| 274 | (data_ready, _, _) = select.select([parent, fd], [], [], |
| 275 | timeout) |
| 276 | |
| 277 | read_terminal_data(parent, data_ready, max_read_bytes, sid) |
| 278 | except OSError: |
| 279 | # If the process is killed, bad file descriptor exception may |
| 280 | # occur. Handle it gracefully |
| 281 | pass |
| 282 | |
| 283 | |
| 284 | def pty_handel_io(connection_data, data, sid): |
no test coverage detected