Add a process to the cgroups represented by this instance.

def add_task(self, pid):
        """
        Add a process to the cgroups represented by this instance.
        """
        _register_process_with_cgrulesengd(pid)
        for cgroup in self.paths:
            with open(os.path.join(cgroup, 'tasks'), 'w') as tasksFile:
                tasksFile.write(str(pid))