- self._exec_gpg(stdin.r, contents.w, sys.stderr.fileno(), status.w)
+ self._exec_gpg(stdin.r, contents.w, stderr.w, status.w)
- read = self._do_io([contents.r, status.r], {stdin.w: data})
+ read = self._do_io([contents.r, stderr.r, status.r], {stdin.w: data})
stdin.w = None # was closed by _do_io
(pid_, exit_code, usage_) = os.wait4(pid, 0)
self.contents = read[contents.r]
self.status = read[status.r]
stdin.w = None # was closed by _do_io
(pid_, exit_code, usage_) = os.wait4(pid, 0)
self.contents = read[contents.r]
self.status = read[status.r]
+ for fd in write.keys():
+ old = fcntl.fcntl(fd, fcntl.F_GETFL)
+ fcntl.fcntl(fd, fcntl.F_SETFL, old | os.O_NONBLOCK)
+
read_lines = dict( (fd, []) for fd in read )
write_pos = dict( (fd, 0) for fd in write )
read_lines = dict( (fd, []) for fd in read )
write_pos = dict( (fd, 0) for fd in write )