code: def _register_process_with_cgrulesengd(pid):
      
      # Logging/printing from inside preexec_fn would end up in the output file,
      # not in the correct logger, thus it is disabled here.
      from ctypes import cdll
      try:
          libcgroup = cdll.LoadLibrary('libcgroup.so.1')
          failure = libcgroup.cgroup_init()
          if failure:
              pass
              #print('Could not initialize libcgroup, error {}'.format(success))
          else:
              CGROUP_DAEMON_UNCHANGE_CHILDREN = 0x1
              failure = libcgroup.cgroup_register_unchanged_process(pid, CGROUP_DAEMON_UNCHANGE_CHILDREN)
              if failure:
                  pass
                  #print('Could not register process to cgrulesndg, error {}. '
                  #      'Probably the daemon will mess up our cgroups.'.format(success))
      except OSError:
          pass
docs: Tell cgrulesengd daemon to not move the given process into other cgroups,
      if libcgroup is available.