11-11-2011
Looks like the wait command is returning code 127 randomly because sometimes the background process is exiting before the wait process is being called.
Now I need to find a way to capture the return status of the background process. Any Ideas how to do that effectively.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Advanced & Expert Users
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
3. Shell Programming and Scripting
: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
4. Shell Programming and Scripting
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
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
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
7. Solaris
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
8. Solaris
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
9. Shell Programming and Scripting
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
10. IP Networking
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