Skip to content

Commit

Permalink
Merge pull request #121 from giuseppe/crun-ignore-join-errors-no-cgroups
Browse files Browse the repository at this point in the history
exec: fix join without cgroups configured
  • Loading branch information
rhatdan authored Oct 3, 2019
2 parents 5980325 + f2271bf commit 2565a7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libcrun/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,12 @@ int
libcrun_move_process_to_cgroup (pid_t pid, char *path, libcrun_error_t *err)
{
int cgroup_mode = libcrun_get_cgroup_mode (err);
if (cgroup_mode < 0)
if (UNLIKELY (cgroup_mode < 0))
return cgroup_mode;

if (path == NULL || *path == '\0')
return 0;

return enter_cgroup (cgroup_mode, pid, path, false, err);
}

Expand Down

0 comments on commit 2565a7f

Please sign in to comment.