if (opts->pid < 0) {
child_pid = fork();
if (child_pid < 0) {
+ last_errno = errno;
cgroup_err("fork failed: %d\n", errno);
return ECGOTHER;
}
* there isn't a running process in it.
*/
execvp("libcgroup_systemd_idle_thread", args);
+
/* The child process should never get here */
+ last_errno = errno;
cgroup_err("failed to create system idle thread.\n");
return ECGOTHER;
}
ret = clock_gettime(CLOCK_MONOTONIC, &start);
if (ret < 0) {
+ last_errno = errno;
cgroup_err("Failed to get time: %d\n", errno);
cgret = ECGOTHER;
goto out;
ret = clock_gettime(CLOCK_MONOTONIC, &now);
if (ret < 0) {
+ last_errno = errno;
cgroup_err("Failed to get time: %d\n", errno);
cgret = ECGOTHER;
goto out;
copy1 = strdup(cgroup->name);
if (!copy1) {
+ last_errno = errno;
ret = ECGOTHER;
goto err;
}
copy2 = strdup(cgroup->name);
if (!copy2) {
+ last_errno = errno;
ret = ECGOTHER;
goto err;
}