Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible multi-account issue #10

Open
pemarko opened this issue Oct 15, 2024 · 0 comments
Open

possible multi-account issue #10

pemarko opened this issue Oct 15, 2024 · 0 comments

Comments

@pemarko
Copy link

pemarko commented Oct 15, 2024

Hi,

I'm looking into script what's going on there and I'm little concerned about multi-account handling. I have no way how to test this, but
"while true loop" inside "for loop" at the end of tado-assistant.sh seems to be stuck in first iteration.

Minimal working example should look sth like this:

#!/bin/bash

# this makes background subshells to terminate - at least on ctrl-c
trap "kill 0" EXIT

for (( i=1; i<=2; i++ )); do
    # spawns subshell on background
    (
    while true; do
        echo "here $i"
        sleep 2
    done
    ) &
done
# waits for subshells to terminate, otherwise main scripts exits right away
wait 

Tested on rpi-zero-w latest 6.6.51+rpt-rpi-v6 GNU bash, version 5.2.15(1)-release

Thx for reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant