Bug #2514
vdemo_pidFromScreen can return multiple PIDs
Status: | Rejected | Start date: | 03/08/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
For certain combinations of component titles, vdemo_pidFromScreen
can return a list of multiple PIDs instead of a single PID, confusing calling functions such as vdemo_check_component
:
jmoringe@fra ~> ssh csracontrol@dsc 'bash -c \'source /vol/csra/releases/trusty/lsp-csra-nightly/lib/vdemo/vdemo_base.sh > /dev/null && source /vol/csra/releases/trusty/lsp-csra-nightly/etc/vdemo_scripts/lsp-csra-config.sh > /dev/null && vdemo_pidFromScreen openhab\''
csracontrol@dsc's password:
32635
27565
jmoringe@fra ~> ssh csracontrol@dsc 'bash -c \'source /vol/csra/releases/trusty/lsp-csra-nightly/lib/vdemo/vdemo_base.sh > /dev/null && source /vol/csra/releases/trusty/lsp-csra-nightly/etc/vdemo_scripts/lsp-csra-config.sh > /dev/null && screen -ls | grep openhab_\''
csracontrol@dsc's password:
32635.openhab.openhab_ (03/03/16 15:59:35) (Detached)
27565.binding-openhab-device-manager.device-manager-openhab_ (03/03/16 15:58:17) (Detached)
In this example, the component titles are "openhab" and "device-manage-openhab", i.e. one title is a suffix of the other.
History
#1 Updated by J. Wienke over 8 years ago
Strange, I thought I fixes exactly that issue one or two years ago...
Seems this only prevents some cases and not all.
#2 Updated by R. Haschke about 8 years ago
Looks like you use vdemo_pidFromScreen with the wrong argument. It should always be called with the full component name, in your case `openhab.openhab`, not only `openhab`.
#3 Updated by R. Haschke about 8 years ago
- Status changed from New to Rejected
#4 Updated by J. Moringen about 8 years ago
Looks like you use vdemo_pidFromScreen with the wrong argument. It should always be called with the full component name, in your case `openhab.openhab`, not only `openhab`.
I actually want to run vdemo_check_component
, vdemo_pidFromScreen
was just the place at which the error problem seemed to be.
What is the correct way to run vdemo_check_component
(See #2515#note-4 for context), then?