summaryrefslogtreecommitdiff
path: root/scripts/safe_mysqld.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/safe_mysqld.sh')
-rwxr-xr-xscripts/safe_mysqld.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh
index 55147a84852..28c7fc69fcc 100755
--- a/scripts/safe_mysqld.sh
+++ b/scripts/safe_mysqld.sh
@@ -88,11 +88,11 @@ then
fi
-NOHUP_NICENESS=`nohup nice`
-if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then
- NOHUP_NICENESS="nohup"
-else
+NOHUP_NICENESS=`nohup nice 2>&1`
+if test $? -eq 0 && test x"$NOHUP_NICENESS" != x0 && nice --1 echo foo > /dev/null 2>&1; then
NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
+else
+ NOHUP_NICENESS="nohup"
fi
export MYSQL_UNIX_PORT