diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-22 17:39:38 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-22 17:39:56 -0400 |
commit | eed3c0fb3497fc65d4fd46204f8d2bc1049b1d96 (patch) | |
tree | 9818147d784fbd7b76b476a14d16d1ec1f536c1b | |
parent | 1e69569033eff7685add2e499e514641c54ac466 (diff) |
micro-optimizations
-rwxr-xr-x | ioslay-firefox | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ioslay-firefox b/ioslay-firefox index 2db3a49..21ea81b 100755 --- a/ioslay-firefox +++ b/ioslay-firefox | |||
@@ -111,7 +111,7 @@ relaunch_iotop() | |||
111 | elif new_pids "$pids" "$oldpids" | 111 | elif new_pids "$pids" "$oldpids" |
112 | then | 112 | then |
113 | kill_iotop | 113 | kill_iotop |
114 | IOTOP_PID=$(launch_iotop $pids) | 114 | IOTOP_PID=$(launch_iotop "$@") |
115 | fi | 115 | fi |
116 | sleep 1 | 116 | sleep 1 |
117 | oldpids=$pids | 117 | oldpids=$pids |
@@ -132,8 +132,9 @@ kill_iotop() | |||
132 | 132 | ||
133 | launch_iotop() | 133 | launch_iotop() |
134 | { | 134 | { |
135 | set -- $(printf '%s\n' "$@" | tac | sed 's/^/--pid=/') | 135 | set -- $(printf '\55\55pid=%s\n' "$@" | tac) |
136 | (set -x; iotop -qq -b "$@") | iotop_reader & | 136 | (set -x |
137 | iotop -qq -b "$@") | iotop_reader & | ||
137 | echo $! | 138 | echo $! |
138 | } | 139 | } |
139 | 140 | ||