From e1de01c3fdde2497cc4a24491b75579624467456 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 5 Oct 2011 11:47:14 +0200 Subject: log to stderr if "-" is given as log-file This works around broken /dev/stderr on some systems. Change-Id: I017b03082ff630c4a713ae74990e88b3fa20d0e1 BUG: 3686 Reviewed-on: http://review.gluster.com/560 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/marker/utils/src/gsyncd.c | 2 +- xlators/features/marker/utils/syncdaemon/gsyncd.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/utils/src/gsyncd.c b/xlators/features/marker/utils/src/gsyncd.c index d3fa2d325a6..d554e562b23 100644 --- a/xlators/features/marker/utils/src/gsyncd.c +++ b/xlators/features/marker/utils/src/gsyncd.c @@ -107,7 +107,7 @@ invoke_gsyncd (int argc, char **argv) /* in restricted mode we forcibly use the system-wide config */ runinit (&runner); runner_add_args (&runner, SBIN_DIR"/gluster", - "--log-file=/dev/stderr", "system::", "getwd", + "--log-file=-", "system::", "getwd", NULL); runner_redir (&runner, STDOUT_FILENO, RUN_PIPE); if (runner_start (&runner) == 0 && diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index 2b8356b1620..f145cbc6d98 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -148,7 +148,7 @@ def main_i(): op.add_option('--gluster-log-file', metavar='LOGF', default=os.devnull, type=str, action='callback', callback=store_abs) op.add_option('--gluster-log-level', metavar='LVL') op.add_option('--gluster-params', metavar='PRMS', default='') - op.add_option('--gluster-cli-options', metavar='OPTS', default='--log-file=/dev/stderr') + op.add_option('--gluster-cli-options', metavar='OPTS', default='--log-file=-') op.add_option('--mountbroker', metavar='LABEL') op.add_option('-p', '--pid-file', metavar='PIDF', type=str, action='callback', callback=store_abs) op.add_option('-l', '--log-file', metavar='LOGF', type=str, action='callback', callback=store_abs) -- cgit