aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-08-22 13:01:09 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-08-22 13:01:09 +0200
commitea2cab73263ef66c93e869e1ef66f15f27663c55 (patch)
tree546c1cce4e61eecab0e8528415176ab42b8958f1
parentb9c8b09c1e3d3df23da3334536c9f8090b1bd15d (diff)
Debug
-rwxr-xr-xpool.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/pool.sh b/pool.sh
index 6f3262f..b18f545 100755
--- a/pool.sh
+++ b/pool.sh
@@ -27,6 +27,7 @@ write_status() {
echo "nproc=${nproc}" >> "$POOL_STATUS"
echo "procs=\"${procs}\"" >> "$POOL_STATUS"
echo "lastprocid=$lastprocid" >> "$POOL_STATUS"
+ echo "createdat=$createdat" >> "$POOL_STATUS"
}
create_properties() {
@@ -58,6 +59,7 @@ create() {
nproc=0
procs=""
lastprocid=0
+ createdat=$(date +"%s")
write_status
}
@@ -109,7 +111,7 @@ cat_output() {
}
list_pool() {
- find "${TMPDIR}" -name "${POOL_FORMAT}*" -exec basename {} \; 2>/dev/null | sed "s/${POOL_FORMAT}//g"
+ find "${TMPDIR}" -maxdepth 1 -name "${POOL_FORMAT}*" -type d -exec basename {} \; 2>/dev/null | sed "s/${POOL_FORMAT}//g"
}
wait_pool() {
@@ -190,7 +192,6 @@ case "$CMD" in
list_output
;;
"ls")
- check_pool
list_pool
;;
"wait")