Commit 75cff2d8 authored by Anael Beutot's avatar Anael Beutot
Browse files

Fix EBADF when closing fds in parent for ForkedJob

parent 5fa561b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -285,6 +285,10 @@ class ForkedJob(object):
                try:
                    os.close(fd)
                except OSError as exc:
                    if exc.errno == errno.EBADF:
                        # FIXME this is weird but it seems to happen sometimes
                        logger.debug('Error while closing fd in parent, EBADF')
                        continue
                    logger.error('Error while closing fds in parent: %s',
                                 os.strerror(exc.errno))
                    raise