diff --git a/cloudcontrol/node/jobs.py b/cloudcontrol/node/jobs.py index dc4dba37eca38f3d2dedb8a73339b1ad60ba3dcf..87966959da6d56bebf3a7c4a5d084b48bad50182 100644 --- a/cloudcontrol/node/jobs.py +++ b/cloudcontrol/node/jobs.py @@ -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