From b5c38f74b0d9d4c2c145100b972978405685862d Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 17 Mar 2009 03:17:50 +0000 Subject: [PATCH] Always tie the child stdin to /dev/null. This commit was SVN r20796. --- orte/mca/plm/submit/pls_submit_module.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/orte/mca/plm/submit/pls_submit_module.c b/orte/mca/plm/submit/pls_submit_module.c index 3b1b1d9581..eff7cc88cf 100644 --- a/orte/mca/plm/submit/pls_submit_module.c +++ b/orte/mca/plm/submit/pls_submit_module.c @@ -824,12 +824,10 @@ int orte_plm_submit_launch(orte_job_t *jdata) argv[proc_vpid_index] = strdup(vpid_string); free(vpid_string); - if (!mca_plm_submit_component.debug) { - /* setup stdin */ - int fd = open("/dev/null", O_RDWR); - dup2(fd, 0); - close(fd); - } + /* Tie /dev/null to stdin */ + fd = open("/dev/null", O_RDWR); + dup2(fd, 0); + close(fd); /* close all file descriptors w/ exception of stdin/stdout/stderr */ for(fd=3; fd