修改 timeout 命令默认信号

This commit is contained in:
whyour
2022-12-05 13:18:10 +08:00
parent 468d05cb10
commit 23fd595582
3 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ format_params() {
time_format="%Y-%m-%d %H:%M:%S"
timeoutCmd=""
if type timeout &>/dev/null; then
timeoutCmd="timeout -k 10s $command_timeout_time "
timeoutCmd="timeout --foreground -s 2 -k 10s $command_timeout_time "
fi
params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
}