1
1

Always tie the child stdin to /dev/null.

This commit was SVN r20796.
Этот коммит содержится в:
Jeff Squyres 2009-03-17 03:17:50 +00:00
родитель 6a72c0f4d1
Коммит b5c38f74b0

Просмотреть файл

@ -824,12 +824,10 @@ int orte_plm_submit_launch(orte_job_t *jdata)
argv[proc_vpid_index] = strdup(vpid_string); argv[proc_vpid_index] = strdup(vpid_string);
free(vpid_string); free(vpid_string);
if (!mca_plm_submit_component.debug) { /* Tie /dev/null to stdin */
/* setup stdin */ fd = open("/dev/null", O_RDWR);
int fd = open("/dev/null", O_RDWR); dup2(fd, 0);
dup2(fd, 0); close(fd);
close(fd);
}
/* close all file descriptors w/ exception of stdin/stdout/stderr */ /* close all file descriptors w/ exception of stdin/stdout/stderr */
for(fd=3; fd<fdmax; fd++) for(fd=3; fd<fdmax; fd++)