I have a daemon and a script (3rd party) that are being used to integrate
applications on NT and AIX. The daemon on aix listens to requests from the
nt environment and executes arbitrary commands, in this case mentioned
script. The daemon is commercial software; I have no control over its
internals. Now the weirdest thing happens.
Consider the following snippet from my script:
wsetemsg $1 $2
rc=$?
...
exit $rc
If I run this script from the shell it works as expected, but when run by
the daemon $? (and thus $rc) is always zero. I tried other variations, like
wsetemsg && rc=1 || rc=0
but sofar no luck. Again, all's well when running from the shell but when
run from the daemon I always get succes, even when wsetemsg fails. I tested
with other commands than wsetemsg with the same results.
This is stumping me and I hope someone wil be able to help. I am game for
both workarounds and structural solutions. What we are trying to achieve is
a better guarding of this integration. As man failures as possible should be
notified.
Regards,
- Jan.
Detail: this concerns integration between Tivoli/Enterprise Console 3.6 and
Tivoli Service Desk 6.0.