X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fgpg.py;h=62bfe096510453c180acb4fda1f5b80af6581ffa;hb=dd80b169287a128cd9e3b833852fbf68106385b5;hp=90103afa0ddc20ae98457e34314d0407714f2f8b;hpb=7b16dbdee739c035838740b7284927020033bee1;p=dak.git diff --git a/daklib/gpg.py b/daklib/gpg.py index 90103afa..62bfe096 100644 --- a/daklib/gpg.py +++ b/daklib/gpg.py @@ -23,7 +23,6 @@ import errno import fcntl import os import select -import sys try: _MAXFD = os.sysconf("SC_OPEN_MAX") @@ -115,6 +114,10 @@ class SignedFile(object): raise GpgException("No valid signature found. (GPG exited with status code %s)\n%s" % (exit_code, self.stderr)) def _do_io(self, read, write): + 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 ) @@ -185,6 +188,6 @@ class SignedFile(object): os.execvp(self.gpg, args) finally: - sys.exit(1) + os._exit(1) # vim: set sw=4 et: