CA command line tools always return 0 (success)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Reported by <email address hidden>:
The EPICS caput command has a return code that indicates success/failure.
A successful command returns 0.
However, I am finding it also returns 0 if the command experienced an
exception:
$ caput LOCK1:LOCKGET 124
Old : LOCK1:LOCKGET 124
New : LOCK1:LOCKGET 124
$ echo $?
0
$ caput LOCK1:LOCKGET 123
Old : LOCK1:LOCKGET 124
New : LOCK1:LOCKGET 123
CA.Client.
Warning: "Channel write request failed"
Context: "op=1, channel=
ctx="LOCK1:
Source File: ../oldChannelNo
Current Time: Fri Dec 22 2017 16:15:44.013886541
.......
$ echo $?
0
description: | updated |
I agree that this is undesirable, but I see no way to avoid this for CA put w/o callback. The protocol doesn't define a completion ack. message. So the fact that the client gets the CA exception message at all is a side-effect of the second get. And handling of exception message has always been a weak point of CA implementations.
The only logic I can think of is the return non-zero if any ca exception message is received.
Not sure if this would trigger any false positives though.