Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-25-2006, 12:00 PM   #1
LQ Newbie
Registered: Apr 2005
Posts: 13

Rep: Reputation: 0
Need the return codes of the child processes


echo "Parallel Processes Start" & &
echo "Parallel Processes Created"

here and are another shell scripts which has exit status as 0 when the scripts executed successfully and 1 for any abnormal termination.

now after wait i have to run only when both and should have returned 0.

Please advise me how to acheive this.

Thanks in advance
Old 04-25-2006, 04:26 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Well, one way is to:

echo "-1" > /dev/shm/aRC
echo "-1" > /dev/shm/bRC
(; echo "$?" > /dev/shm/aRC) &
(; echo "$?" > /dev/shm/bRC) &
if [ "`/bin/cat /dev/shm/aRC`" == "0" ] && [ "`/bin/cat /dev/shm/bRC`" == "0" ]
/bin/rm -f /dev/shm/aRC /dev/shm/bRC
Note the '/dev/shm' is a kernel provided shared memory filesystem. You may not have it available, depending on your release or distribution. You can just use disk files in that case.

I'm sure others will chime in with 100 additional ways to accomplish the same thing.

Last edited by macemoneta; 04-25-2006 at 04:28 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PPP library & pppd, chat return codes ruchika Linux - Networking 1 03-08-2011 02:50 AM
perl ignore return codes twistedpair Programming 5 02-14-2006 04:54 PM
mprotect() return codes tim_l Programming 2 05-09-2005 07:38 AM
return codes in c exvor Programming 4 01-21-2005 08:45 PM
GNU wget return codes for shell script greenhornet Programming 3 05-09-2004 07:51 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration