charts.d.plugin: never use `-t` option for `timeout` (#9568)
Ilya Mashchenko committed
Jul 21, 2020 at 11:31 UTC
e90d32d0fa368968a379f97516744e9d99312692
1 file changed
+1
-9
collectors/charts.d.plugin/charts.d.plugin.in
+1
-9
@@ -294,15 +294,7 @@ run() {
294
if [ "z${1}" = "z-t" -a "${2}" != "0" ]; then
295
t="${2}"
296
shift 2
297
-
298
- case "$(getosid)" in
299
- "alpine")
300
- timeout -t ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"
301
- ;;
302
- *)
303
- timeout ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"
304
- ;;
305
- esac
297
+ timeout "${t}" "${@}" 2>"${TMP_DIR}/run.${pid}"
298
ret=$?
299
else
300
"${@}" 2>"${TMP_DIR}/run.${pid}"