summaryrefslogtreecommitdiffstats
path: root/lib/remote/report.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2021-01-29 03:28:54 +0100
committerSuren A. Chilingaryan <csa@suren.me>2021-01-29 03:28:54 +0100
commitdf82b8cddd27f848e71395d02348712a658c88b4 (patch)
tree36bca2a8dc566ab7ee17251f6db70b7f581b4358 /lib/remote/report.sh
parentaeaa76f98c0d6a8617c06c38598ddc8cf664cae7 (diff)
downloadconky-df82b8cddd27f848e71395d02348712a658c88b4.tar.gz
conky-df82b8cddd27f848e71395d02348712a658c88b4.tar.bz2
conky-df82b8cddd27f848e71395d02348712a658c88b4.tar.xz
conky-df82b8cddd27f848e71395d02348712a658c88b4.zip
Ensure fd12 is writeable
Diffstat (limited to 'lib/remote/report.sh')
-rw-r--r--lib/remote/report.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/remote/report.sh b/lib/remote/report.sh
index e6766a4..434c6aa 100644
--- a/lib/remote/report.sh
+++ b/lib/remote/report.sh
@@ -1,7 +1,10 @@
function simple_report {
local generator="$1"
local filter="${2:-cat}"
+
+ # Create fd12 (sending empty output), execute checks (writting extra info on fd12), print main info and store extra info into variable, wait for termination of async checks.
{
+ chmod +w /dev/fd/12
eval "$generator 12>/dev/fd/12 | $filter"
report=$(cat<&12)
} 12<<EOF