system command and threads problems


 
Thread Tools Search this Thread
Operating Systems AIX system command and threads problems
# 1  
Old 04-21-2007
CPU & Memory system command and threads problems

Hi, my name is German.
Im working with an aix over one year and i have developed a PRO*C multithread process that reads commands from a table and execute it in parallel (one command by thread) with a system function call, so depending the process exit code (system return value) , I put a mark (OK or ERROR) in that table.
My problem: there is ONE process that terminate ok and the system function returns an exit code different from 0 and consequently I put a mark erroneous.

Then I thought , system function is not threadsafe (problem with signals) and im not got a consistent return value ? OR, I saw that this process is a ksh script and not have the "exit 0" sentence if everything go fine, so maybe ksh (or sh -c) not return a default zero value when the script finishes its execution at the end of the file Smilie

Sorry my english, I really hope you can help me.
Thanks a lot in advanced.
German.
# 2  
Old 04-21-2007
A ksh script without an exit 0 will return the result code from the last command executed in the script. If the return code of the final command is non-zero the exit code from the script will also be non-zero.
# 3  
Old 04-21-2007
My last command is sqlplus. It execute a pl-sql script and doesnt have any return value forced. The log file shows that it finished ok.
So, my question will be the same again, sqlplus running a plsql script will return always a zero value if it finishes its execution at end of script?
I think that I must look for the answer in the correct forum/topic.

Thanks a lot reborg!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Ubuntu

Login Problems when the system is grub mode

Hi Experts, I am using ubuntu.When i am trying to login it is showing grub ..How i can overcome to this problem..Pls reply me ASAP.. Thanks, Sree (1 Reply)
Discussion started by: sree vasu
1 Replies

2. UNIX for Advanced & Expert Users

How to determine the number of NFS threads RUNNING on the system

Hi, Anyone can tell me how to get the number of NFS threads RUNNING on the system for Solaris 10? Someone told me for Solaris 9, the method is "echo "*svc$<svcpool" | adb -k. But, I've tried to google the method for Solaris 10 and did not find the corresponding method, please help... (1 Reply)
Discussion started by: wang.caiqi
1 Replies

3. UNIX for Advanced & Expert Users

System V IPC problems

Hi all, Is there a situation like system assigning same ID's for semaphores and shared memory at the same time. Ex: When I try to create 10 Shared memory objects with starting key as 0x1500 and 10 semaphore objects with starting key as 0x1234 in the same program. Assume those are not deleted... (2 Replies)
Discussion started by: gkreddy
2 Replies

4. Linux

Sabayon - KDE4.2 Problems accessing system management - all greyed out

I have just loaded Sabayon KDE4.2. I have a 64bit comp and have tried several Linux/Unix os and have had problems with all of them and now it seems this one as well. I can't load my printer up and I cannot access any login management. I have had trouble accessing my Login Manager. I have looked... (3 Replies)
Discussion started by: Tony_photoplus
3 Replies

5. UNIX for Dummies Questions & Answers

Command to find number of threads

Shell script to find number of threads for relay http (0 Replies)
Discussion started by: rajeev3062002
0 Replies

6. UNIX for Advanced & Expert Users

Problems when rebooting the system

Hi ! I am working on a server. We have ABAQUS installed on it. I added a compiler to .env file and added usr/local...../IMSL/... to the path. Then i restarted the computer and I get this error: when I am doing interactive option (Red hat Lunix OS) Start service local Yes/no/Continue? no... (1 Reply)
Discussion started by: dsmv
1 Replies

7. UNIX for Advanced & Expert Users

File system problems

Hi All, I am currently running Linux on a file server. The server starts experiencing problems (slow access, no access). After a shutdown and reboot, the file system is corrupted and requires to run fsck to clean up. Is this signs of a failing hard drive? Ken (2 Replies)
Discussion started by: kmcvey
2 Replies

8. UNIX for Dummies Questions & Answers

Prints Problems on Unix system

We are experiencing printing problems coming from an Unix host. In Feb. 05 we applied patches to the Unix operating system. Shortly the patches were applied we began experiencing problems printing on a IBM 6400 that emulates an Epson printer. When the printing starts we can print about 10 pages and... (1 Reply)
Discussion started by: ddameron
1 Replies

9. Programming

CC command problems

Apparently I do not have C on my Sun Blade. It's a fresh install, and I'l fairly new to using this box. When I type cc, I get the following: /usr/ucb/cc: language optional software package not installed... Does this mean I do not have C on this Blade? How can I get it and set it up? Thanks! (1 Reply)
Discussion started by: jpeery
1 Replies
Login or Register to Ask a Question