The function orte_iof_base_setup_prefork attempts to create a pty for
child stdout and falls back to plain pipe if openpty fails. Child uses
the 'usepty' flag to decide whether to treat this descriptor as a pty
or as a pipe.
Set 'usepty' flag to 0 upon openpty failure to inform the child that
it isn't dealing with a pty even though pty has been requested.


Patch applies against svn trunk and v1.6.5, where I found this issue.


Index: orte/mca/iof/base/iof_base_setup.c
===================================================================
--- orte/mca/iof/base/iof_base_setup.c  (revision 29155)
+++ orte/mca/iof/base/iof_base_setup.c  (working copy)
@@ -94,6 +94,7 @@
 #endif

     if (ret < 0) {
+        opts->usepty = 0;
         if (pipe(opts->p_stdout) < 0) {
             ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_PIPES);
             return ORTE_ERR_SYS_LIMITS_PIPES;

Reply via email to