diff options
author | monty@mashka.mysql.fi <> | 2002-11-24 16:20:41 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-11-24 16:20:41 +0200 |
commit | 4575594e1a2d02cc7b8762fca56d8cafe6054dac (patch) | |
tree | 1676650805d33f6e1d862e2f2323524e6ce860a2 /scripts | |
parent | d882391975129b57f4f800f902cc580abd46c03b (diff) | |
download | mariadb-git-4575594e1a2d02cc7b8762fca56d8cafe6054dac.tar.gz |
Rewrote nice handling to make more portable
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/safe_mysqld.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh index 2272443c972..96568bd5d19 100644 --- a/scripts/safe_mysqld.sh +++ b/scripts/safe_mysqld.sh @@ -157,9 +157,14 @@ NOHUP_NICENESS="nohup" if test -w / then 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 -n $NOHUP_NICENESS nohup" + if test $? -eq 0 && test x"$NOHUP_NICENESS" != x0 && nice --1 echo foo > /dev/null 2>&1 + then + if $NOHUP_NICENESS -gt 0 + then + $NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup" + else + NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup" + fi else NOHUP_NICENESS="nohup" fi |