Kill instance of salome when running in TUI [killSalome]

when running a script in TUI by “salome -t” if we want to kill salome after the script is finished,
I normally added at the end of the script

import killSalome

but this will kill all the instances of salome if I am correctly, so if we are running multiple scripts in the background it will be problematic, is there any way to kill the actual instance?
i found “killSalome.killMyPort” and tried to use

import killSalome

without succes, as the instance stills runs. any solution for this?
it looks that this workaround solves the problem I was having, by adding at the end of the script:

import killSalome os

best regards,