Skip to content

Commit

Permalink
mxqd: set TMPDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Sep 3, 2015
1 parent fdb3dbb commit becb9fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ OS_RELEASE = $(shell ./os-release)

# special defaults for mariux64
ifeq (${OS_RELEASE}, mariux64)
MXQ_INITIAL_PATH := ${MXQ_INITIAL_PATH}:/usr/local/package/bin

MXQ_INITIAL_PATH := ${MXQ_INITIAL_PATH}:/usr/local/package/bin
CFLAGS_MXQ_INITIAL_TMPDIR = -DMXQ_INITIAL_TMPDIR=\"/scratch/local\"
endif

########################################################################
Expand Down Expand Up @@ -378,6 +378,7 @@ mxqd.o: $(mxq_job.h)
mxqd.o: $(mx_mysql.h)
mxqd.o: CFLAGS += $(CFLAGS_MYSQL)
mxqd.o: CFLAGS += $(CFLAGS_MXQ_INITIAL_PATH)
mxqd.o: CFLAGS += $(CFLAGS_MXQ_INITIAL_TMPDIR)
mxqd.o: CFLAGS += -Wno-unused-but-set-variable

clean: CLEAN += mxqd.o
Expand Down
3 changes: 3 additions & 0 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,9 @@ static int init_child_process(struct mxq_group_list *group, struct mxq_job *j)
mx_setenv_forever("USERNAME", g->user_name);
mx_setenv_forever("LOGNAME", g->user_name);
mx_setenv_forever("PATH", MXQ_INITIAL_PATH);
#ifdef MXQ_INITIAL_TMPDIR
mx_setenv_forever("TMPDIR", MXQ_INITIAL_TMPDIR);
#endif
mx_setenv_forever("PWD", j->job_workdir);
mx_setenv_forever("HOME", passwd->pw_dir);
mx_setenv_forever("SHELL", passwd->pw_shell);
Expand Down

0 comments on commit becb9fa

Please sign in to comment.