wait - return code 127


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users wait - return code 127
# 8  
Old 11-11-2011
Quote:
Originally Posted by tostay2003
Hi,

How can we identify the below:

a) Maybe an old version with a bug
b) time limit that the shell holds the exit code

-- how much ahead of the wait are your processes finishing?
It might be in fraction of secs. its a simple loop

Thanks
I don't think the issue is being caused by the asynch command finishing before the wait is issued, espeically if its within a second or two.

If you are using Kshell or bash, run the command bash --version or ksh --version to determine the version. If it isn't the most current, upgrade.

If your scripts are simple, you might want to post them -- might be something in the scripts that is causing the issue too. Hard to say without seeing them.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

127.0.0.1 vs 0.0.0.0

Which one should I use in '/etc/hosts'? Please explain in details. Random quotes on the topic: (2 Replies)
Discussion started by: useretail
2 Replies

2. Shell Programming and Scripting

calling a shell script in background and wait using "wait" in while loop

Hi, I am facing a strange issue, when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed. cat abc.txt | while read -u4 line do #if line contains #... (2 Replies)
Discussion started by: mihirvora16
2 Replies

3. Solaris

multitude of packets from 127.0.0.1

I was checking routing table, and noticed that our server has a lot packets from localhost: Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- .. 127.0.0.1 127.0.0.1 ... (1 Reply)
Discussion started by: orange47
1 Replies

4. Solaris

Can't setup gateway other than 127.0.0.1?

I have just installed Solaris 10 X86 today, but I can't use internet at all on it. When I was installing it, it only asked me to create a hostname, without even asking me this computer is "networked" or "non-networked". After I finished installation, I use "netstat -rn" command, and only see... (3 Replies)
Discussion started by: Diamondust
3 Replies

5. Shell Programming and Scripting

wait command - cat it wait for not-chile process?

Did not use 'wait' yet. How I understand by now the wait works only for child processes, started background. Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?) I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies

6. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

7. Shell Programming and Scripting

rc=127 can't fork

I have a script to download a file using wget. It works if I execute it from the command line. But, if I run it in cron, it doesnt work and I am getting the following in the cron log: > CMD: /export/home/username/test > username 23159 c Tue Aug 1 14:40:00 2006 < username 23159 c Tue Aug ... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

8. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies

9. UNIX for Advanced & Expert Users

Return code from PL/SQL Code

Hi Guys, I was just wondering if anybody can help me with this problem. OK, how we can get a value back from PL/SQL Script (not stored procedure/function) See the below example: (for example aaa.sh) #!/bin/ksh VALUE=`sqlplus -s user/password@test_id <<EOF @xxx.sq EOF` echo $VALUE ... (7 Replies)
Discussion started by: Shaz
7 Replies

10. Shell Programming and Scripting

Background processes return 127 sporadically

I have created a shell script that spawns multiple background processes (spawns sqlplus application). I use an array to capture the process id of those background processes. I then loop through the array and issue a 'wait' command to wait on the process id that was captured in the array. I am... (2 Replies)
Discussion started by: max_largo
2 Replies
Login or Register to Ask a Question
wait(1) 						      General Commands Manual							   wait(1)

NAME
wait - await process completion SYNOPSIS
[pid] DESCRIPTION
If no argument is specified, waits until all processes (started with of the current shell have completed, and reports on abnormal termina- tions. If a numeric argument pid is given and is the process ID of a background process, waits until that process has completed. Other- wise, if pid is not a background process, exits without waiting for any processes to complete. Because the system call must be executed in the parent process, the shell itself executes without creating a new process (see wait(2)). Command-Line Arguments supports the following command line arguments: The unsigned decimal integer process ID of a command, whose termination is to wait for. WARNINGS
Some processes in a 2-or-more-stage pipeline may not be children of the shell, and thus cannot be waited for. SEE ALSO
csh(1), ksh(1), sh-posix(1), sh(1), wait(2). STANDARDS CONFORMANCE
wait(1)