Skip to content

Commit

Permalink
Merge pull request #80 from mariux64/v0.26.1
Browse files Browse the repository at this point in the history
V0.26.1
  • Loading branch information
donald authored Jan 29, 2020
2 parents 81e49c9 + 0473d02 commit 15a6365
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 5 additions & 1 deletion mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,11 @@ static int init_child_process(struct mxq_group_list *glist, struct mxq_job *job)
if (group->job_tmpdir_size == 0) {
mx_setenv_forever("TMPDIR", server->initial_tmpdir);
} else {
mx_setenvf_forever("TMPDIR", "%s/%lu", MXQ_JOB_TMPDIR_MNTDIR, job->job_id);
char *mxq_job_tmpdir;
mx_asprintf_forever(&mxq_job_tmpdir, "%s/%lu", MXQ_JOB_TMPDIR_MNTDIR, job->job_id);
mx_setenv_forever("MXQ_JOB_TMPDIR", mxq_job_tmpdir);
mx_setenv_forever("TMPDIR", mxq_job_tmpdir);
free(mxq_job_tmpdir);
}
fh = open("/proc/self/loginuid", O_WRONLY|O_TRUNC);
if (fh == -1) {
Expand Down
2 changes: 1 addition & 1 deletion mxqsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void print_usage(void)
"\n"
" -j, --threads=NUMBER set number of threads (default: 1)\n"
" -m, --memory=SIZE set amount of memory (default: 2G)\n"
" --tmpdir=SIZE set size of TMPDIR (default: 0)\n"
" --tmpdir=SIZE set size of MXQ_JOB_TMPDIR (default: 0)\n"
"\n"
" [SIZE] may be suffixed with a combination of T, G and M\n"
" to specify tebibytes, gibibytes and mebibytes.\n"
Expand Down
15 changes: 7 additions & 8 deletions web/pages/mxq/mxq.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ sub HEAD {
return "<!DOCTYPE html><html>\n<head>\n".STYLE()."</head>\n";
}

sub selfurl {
my ($path_info)=@_;
return $q->url().$path_info;
}

sub my_url {
my ($module,$params)=@_;

my $uri=new URI($module,$q->url());
my $uri=new URI(selfurl("/$module"));
$uri->query_form($params,';');
return $uri;
}
Expand Down Expand Up @@ -643,7 +647,7 @@ sub group_table {
$q->td({class=>'number'},$job_threads),
$q->td({class=>'number'},size($job_memory*1000**2)),
$q->td({class=>'number'},days($job_time*60)),
$q->td({class=>'number'},size($job_tmpdir_size*1000*1000*1000)),
$q->td({class=>'number'}, $job_tmpdir_size ? size($job_tmpdir_size*1000*1000*1000) : '-'),
$q->td($q->a({href=>my_url('groups',{user_name=>$user_name})},$user_name)),
$q->td(group_status($group_status)),
$q->td({class=>'number'},$group_jobs),
Expand Down Expand Up @@ -862,11 +866,6 @@ sub server() {
return $out;
}

sub selfurl {
my ($path_info)=@_;
return $q->url().$path_info;
}

sub top_menu {
return '<table class="menu">' . $q->Tr(
$q->td(a({href=>selfurl('/groups')},'groups')),$q->td('&nbsp;'),
Expand Down

0 comments on commit 15a6365

Please sign in to comment.