summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-04 21:19:32 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-06 09:45:50 +0100
commit5142cd55f492a2c9a2e308e168c86278765f95c3 (patch)
tree5b311395e7dabdc43c310b47bee5b9eb58439e99 /scripts
parentb5aa0f437fc595d508b9eb5d36185fd8cbaa62eb (diff)
downloadmariadb-git-5142cd55f492a2c9a2e308e168c86278765f95c3.tar.gz
MDEV-11052 mariadb-service-convert does not work after upgrading to 10.1.18
mysqld_safe: don't close stdout and stderr if --dry-run
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index d4d2a0a6c37..0a9f411717c 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -738,10 +738,6 @@ else
logging=syslog
fi
-# close stdout and stderr, everything goes to $logging now
-exec 1>&-
-exec 2>&-
-
USER_OPTION=""
if test -w / -o "$USER" = "root"
then
@@ -987,9 +983,14 @@ do
done
cmd="$cmd $args"
[ $dry_run -eq 1 ] && return
+
# Avoid 'nohup: ignoring input' warning
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"
+# close stdout and stderr, everything goes to $logging now
+exec 1>&-
+exec 2>&-
+
log_notice "Starting $MYSQLD daemon with databases from $DATADIR"
# variable to track the current number of "fast" (a.k.a. subsecond) restarts