* Free memory from asprintf
* need to compare ERANGE to errno This commit was SVN r15860.
Этот коммит содержится в:
родитель
edd8e7fcda
Коммит
330003361b
@ -246,6 +246,7 @@ static int pls_tm_launch_job(orte_jobid_t jobid)
|
||||
umask(current_umask);
|
||||
asprintf(&var, "0%o", current_umask);
|
||||
opal_setenv("ORTE_DAEMON_UMASK_VALUE", var, true, &env);
|
||||
free(var);
|
||||
|
||||
/* If we have a prefix, then modify the PATH and
|
||||
LD_LIBRARY_PATH environment variables. We only allow
|
||||
|
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
|
||||
if (NULL != umask_str) {
|
||||
char *endptr;
|
||||
long mask = strtol(umask_str, &endptr, 8);
|
||||
if ((! (0 == mask && (EINVAL == errno || ERANGE))) &&
|
||||
if ((! (0 == mask && (EINVAL == errno || ERANGE == errno))) &&
|
||||
(*endptr == '\0')) {
|
||||
umask(mask);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user