Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] [PATCH] orte: Do not call tcgetattr on pipe descriptor
From: Michał Pecio (michal.pecio_at_[hidden])
Date: 2013-09-10 16:40:31


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;