If a badly written script don't exit when signaled, execteCommandLine calls never return, and blocks the execution thread indefinately.
Steps to reproduce:
Create a python script (test.py) that ignores signals
import time
while True:
try:
time.sleep(10)
except BaseException:
None
Execute the script in a rule:
rule "test"
when
Item Test received command
then
var result = executeCommandLine("python@@/path/to/script/test.py", 5000)
logInfo("test.rules", result.toString())
end
executeCommandLine will never return and the thread becomes blocked, possibly preventing other rules to run if the threadpool is full.
If a badly written script don't exit when signaled, execteCommandLine calls never return, and blocks the execution thread indefinately.
Steps to reproduce: Create a python script (test.py) that ignores signals
Execute the script in a rule:
executeCommandLine will never return and the thread becomes blocked, possibly preventing other rules to run if the threadpool is full.
More details: https://community.openhab.org/t/solved-executecommandline-sometimes-not-returning-and-blocking-rule-thread/63467/9