I am using an enterprise utility for document archiving. This program calls a custom C exit to do data manipulation before loading data into the archive.
When the program is called via an automation script (Ran as ROOT), program successfully executes the C exit, and gives me an RC 0.
When I try to execute the same program, I get a return code 16. I suspect that this is because of the exit. When I remove the exit from the processing, the program runs fine.
My account on the server has full sudo access.
Can't seem to figure this out but I have a sneaking suspicion that this is due to permissions somewhere, since ROOT can run it, but my SUDO ID cant.
I've engaged vendor support, and they haven't helped. Anyone have an idea?
I am assuming the LD_LIBRARY_PATH works in AIX as it does elsewhere. Please correct me if this is a bad assumption. EDIT: checked - 5.1 AIX and earlier uses LIBPATH, which may be brought forward to other newer releases. Newer releases use LD_LIBRARY_PATH as I expected.
See if you can successfully run the ldd command as yourself against the compiled program. Try it again as root user.
It could be that LD_LIBRARY_PATH needs to change for your user. The differences in output of the two ldd commands should give you a clue.
As an aside, subverting/reinventing system calls like exit() is generally a poor idea. And it is sometimes done by using replacement shared libraries and/or changing the LD_LIBRARY_PATH order of shared libraries.
Just because you have sudo does not mean your run as root all the time, which is what that ldd example shows. I'm not sure about the AIX syntax of the result - specifically the (shr.o)
It appears to be an object file file - somewhere - perhaps linked into the CustomExit code.
If an AIX person sees this it may help both of us. But IMO, you have some sort of permission issue. Example: the CustomExit code calls setuid()
Does nm CustomExit work for you (after sudo)? Please post the output.
And do you have a way of finding what exit code 16 - the error number - means for that app? Please post it if yes.
i have a "if .. then exit end " in s shell script on remote servers.
now the connection to the remote server got killed after i run this script on the remote servers. How do i run this script on remote hosts and still keep remote connections alive after executing the script.
Thank you. (10 Replies)
Hi,
I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script.
My intension is to execute... (4 Replies)
Hi All,
I have one shell script start.sh which executes another shell script test.sh something like below :test.sh -param1 -param2
In the test.sh there is one command for removing file:rm file1.bak
I want whenever I execute start.sh, it will execute test.sh and if it finds string rm... (7 Replies)
Hi
In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.Can anyone help here please (3 Replies)
Hello Friends,
Hope you are doing well.
I just need a help in executing multiple processes.
I've written a shell script which calls another scritps. But the problem is there are too many processes to run, and each process takes about a min to finish its execution.
So, I want to just... (3 Replies)
My job is launched using this command: I'm at home and having VPN drops so I used nohup and background.
nohup perf_mon -c rating_4_multi,cfg &
The main script is PID 26119, and the sub task under it is 26118 which is not running - just sits there. 26119 runs forever but nothing else runs. I... (2 Replies)
I have a function that returns a bunch of exit codes, say func1, and in my code I'm trying to execute that function in an if statement. This is the closest I could get.
f1call=`func1 $arg1 $arg2`
if ]; then
...
fi
When I run the script the function never gets called. What's the right way... (7 Replies)
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)