code: def go_to_background():
      
      try:
          if os.fork():
              sys.exit()
      except OSError as errmsg:
          LOGGER.error('Fork failed: {0}'.format(errmsg))
          sys.exit('Fork failed')
docs: Daemonize the running process.