Made signals posix compliant
This commit is contained in:
parent
1db8adfa98
commit
fd2dfabce2
|
@ -1,6 +1,6 @@
|
||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||||
|
|
||||||
## FUNC_BUILD=2016081806
|
## FUNC_BUILD=2016082201
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
|
@ -183,7 +183,7 @@ function KillChilds {
|
||||||
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
||||||
if ( [ "$self" == true ] && kill -0 $pid > /dev/null 2>&1); then
|
if ( [ "$self" == true ] && kill -0 $pid > /dev/null 2>&1); then
|
||||||
Logger "Sending SIGTERM to process [$pid]." "DEBUG"
|
Logger "Sending SIGTERM to process [$pid]." "DEBUG"
|
||||||
kill -s SIGTERM "$pid"
|
kill -s TERM "$pid"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
sleep 15
|
sleep 15
|
||||||
Logger "Sending SIGTERM to process [$pid] failed." "DEBUG"
|
Logger "Sending SIGTERM to process [$pid] failed." "DEBUG"
|
||||||
|
|
Loading…
Reference in New Issue