From e8e3646c9d12016e2bcdb20e6e2a753aa28cd6d6 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 19 May 2004 19:52:24 +0000 Subject: [PATCH] Allow lds==NULL on lam_output_open(), giving a default set of output destinations (i.e., stderr) This commit was SVN r1137. --- src/util/output.c | 7 +++++++ src/util/output.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/util/output.c b/src/util/output.c index 74ca111538..5c55594b6f 100644 --- a/src/util/output.c +++ b/src/util/output.c @@ -328,6 +328,13 @@ static int do_open(int output_id, lam_output_stream_t *lds) i = output_id; } + /* Special case: if we got NULL for lds, then just use the default + verbose */ + + if (NULL == lds) { + lds = &verbose; + } + /* Got a stream -- now initialize it and open relevant outputs */ info[i].ldi_used = true; diff --git a/src/util/output.h b/src/util/output.h index 04efa3cfc8..e638712faa 100644 --- a/src/util/output.h +++ b/src/util/output.h @@ -220,6 +220,9 @@ extern "C" { * using it in successive calls to LAM_OUTPUT(), lam_output(), * lam_output_switch(), and lam_output_close(). * + * If lds is NULL, the default descriptions will be used, meaning + * that output will only be sent to stderr. + * * It is safe to have multiple threads invoke this function * simultaneously; their execution will be serialized in an * unspecified manner.