diff --git a/lib/tasks/gettaskinfos b/lib/tasks/gettaskinfos index 648e4ab..7604735 100644 --- a/lib/tasks/gettaskinfos +++ b/lib/tasks/gettaskinfos @@ -10,7 +10,7 @@ gettaskinfos() { FROM tasks WHERE id='$1'; ' >&3 - read -u4 line + read -u4 -d$'\0' line taskid=${line%%::AtOM:SQL:Sep::*} rest="${line#*::AtOM:SQL:Sep::}::AtOM:SQL:Sep::" sourcefileid=${rest%%::AtOM:SQL:Sep::*} diff --git a/lib/workers/create b/lib/workers/create index f4c9cff..02f69fb 100644 --- a/lib/workers/create +++ b/lib/workers/create @@ -2,7 +2,7 @@ createworker() { (( ++active )) - read -u4 line + read -u4 -d$'\0' line taskid=${line%%::AtOM:SQL:Sep::*} rest="${line#*::AtOM:SQL:Sep::}::AtOM:SQL:Sep::" sourcefileid=${rest%%::AtOM:SQL:Sep::*} diff --git a/lib/workers/master b/lib/workers/master index 0ef64e8..c88a9d8 100644 --- a/lib/workers/master +++ b/lib/workers/master @@ -10,7 +10,7 @@ master() { WHERE status = 0; '>&3 - read -u4 remaining + read -u4 -d$'\0' remaining if (( remaining == 0 )) then sleep 0.1 @@ -108,7 +108,7 @@ master() { LIMIT 1; '>&3 - read -u4 ready + read -u4 -d$'\0' ready if (( ready > 0 )) then createworker @@ -194,7 +194,7 @@ master() { LIMIT 1; ' >&3 - read -u4 ready + read -u4 -d$'\0' ready if (( active == 0 && ready == 0 )) then @@ -234,7 +234,7 @@ master() { WHERE status = 0; '>&3 - read -u4 remaining + read -u4 -d$'\0' remaining done fi }