Skip to content

Commit

Permalink
Merge pull request #166 from mariux64/fix-165
Browse files Browse the repository at this point in the history
mxqd: Remove RLIMIT_CPU usage for runtime limitation
  • Loading branch information
donald authored Sep 11, 2024
2 parents adb6f2f + 92167df commit d83d4bf
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,17 +1018,6 @@ static void exec_reaper(struct mxq_server *server,struct mxq_group_list *glist,
mx_log_err("job=%s(%d):%lu:%lu setrlimit(RLIMIT_CORE, ...) failed: %m",
group->user_name, group->user_uid, group->group_id, job->job_id);

/* set single threaded time limits */
if (group->job_threads == 1) {
/* set cpu time limits - hardlimit is 105% of softlimit */
rlim.rlim_cur = group->job_time*60;
rlim.rlim_cur = group->job_time*63;

if (setrlimit(RLIMIT_CPU, &rlim) == -1)
mx_log_err("job=%s(%d):%lu:%lu setrlimit(RLIMIT_CPU, ...) failed: %m",
group->user_name, group->user_uid, group->group_id, job->job_id);
}

if (initgroups(passwd->pw_name, group->user_gid) == -1) {
mx_log_err("job=%s(%d):%lu:%lu initgroups() failed: %m",
group->user_name, group->user_uid, group->group_id, job->job_id);
Expand Down

0 comments on commit d83d4bf

Please sign in to comment.