Skip to content

Commit 73298ad

Browse files
author
rhc54
authored
Merge pull request #2192 from rhc54/topic/showhelp
Send show_help out thru stderr
2 parents 4f1b63d + 51b2bb1 commit 73298ad

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

orte/util/show_help.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "orte/util/show_help.h"
4444

4545
bool orte_help_want_aggregate = false;
46+
static int orte_help_output;
4647

4748
/*
4849
* Local variable to know whether aggregated show_help is available or
@@ -447,7 +448,7 @@ static int show_help(const char *filename, const char *topic,
447448
fflush(orte_xml_fp);
448449
free(tmp);
449450
} else {
450-
opal_output(orte_clean_output, "%s", output);
451+
opal_output(orte_help_output, "%s", output);
451452
}
452453
if (!show_help_timer_set) {
453454
show_help_time_last_displayed = now;
@@ -537,6 +538,8 @@ void orte_show_help_recv(int status, orte_process_name_t* sender,
537538

538539
int orte_show_help_init(void)
539540
{
541+
opal_output_stream_t lds;
542+
540543
OPAL_OUTPUT_VERBOSE((5, orte_debug_output, "orte_show_help init"));
541544

542545
/* Show help duplicate detection */
@@ -546,6 +549,12 @@ int orte_show_help_init(void)
546549

547550
OBJ_CONSTRUCT(&abd_tuples, opal_list_t);
548551

552+
/* create an output stream for us */
553+
OBJ_CONSTRUCT(&lds, opal_output_stream_t);
554+
lds.lds_want_stderr = true;
555+
orte_help_output = opal_output_open(&lds);
556+
OBJ_DESTRUCT(&lds);
557+
549558
save_help = opal_show_help;
550559
opal_show_help = orte_show_help;
551560
ready = true;
@@ -560,6 +569,8 @@ void orte_show_help_finalize(void)
560569
}
561570
ready = false;
562571

572+
opal_output_close(orte_help_output);
573+
563574
opal_show_help = save_help;
564575
save_help = NULL;
565576

0 commit comments

Comments
 (0)