git @ Cat's Eye Technologies Falderal / d211651
Make fa-under-pty simpler and more robust by using a file object. Chris Pressey 7 years ago
1 changed file(s) with 3 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1616 accum = ''
1717 SIZE = 1024
1818 done = False
19 while not done:
20 s = os.read(fd, SIZE)
21 if len(s) < SIZE:
22 done = True
23 accum += s
19 f = os.fdopen(fd)
20 s = f.read()
21 f.close()
2422 (pid, exitcode) = os.waitpid(pid, 0)
2523 core_dumped = (exitcode & 128) == 128
2624 exitcode = exitcode >> 8