Skip to content

Commit

Permalink
merged with SLES11
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Oct 1, 2018
2 parents 1c4fd6b + a7c2544 commit eeddbd3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion liby2util-r/src/y2log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ static bool log_to_syslog = false;
static bool log_all_variable = false;
static bool log_simple = false;

// read getenv only once to reduce chance for race condition with setenv set by another thread
static bool y2log_should_be_buffered = getenv (Y2LOG_VAR_ONCRASH) != NULL;

static FILE *Y2LOG_STDERR = stderr; /* Default output */

/* static prototypes */
Expand Down Expand Up @@ -596,7 +599,7 @@ bool get_log_debug()

bool should_be_buffered ()
{
return getenv (Y2LOG_VAR_ONCRASH) != NULL;
return y2log_should_be_buffered;
}

// stores a few strings. can append one. can return all. old are forgotten.
Expand Down
7 changes: 7 additions & 0 deletions package/yast2-core.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 28 16:47:42 CEST 2018 - schubi@suse.de

- Reduced risk of race condition between getenv and setenv while
logging (bsc#1103076)
- 3.2.3

-------------------------------------------------------------------
Wed Jan 4 09:16:02 UTC 2017 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
%bcond_with werror

Name: yast2-core
Version: 3.2.2
Version: 3.2.3
Release: 0
Url: https://github.com/yast/yast-core

Expand Down

0 comments on commit eeddbd3

Please sign in to comment.