i get : IOError: [Errno 9] Bad file descriptor when i have logging and using daemon.DaemonContext() i tried passing : fh = logging.handlers.TimedRotatingFileHandler(LOG_FILENAME, 'midnight', encoding='utf-8') with : context = daemon.DaemonContext() context.files_preserve=[fh] but no good what am i doing wrong?