starting many child threads simultaneously


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting starting many child threads simultaneously
# 1  
Old 03-23-2010
starting many child threads simultaneously

i have a parent process and 5 child process.
As soon as the parent process is completed the 5 child processes need to start simultaneously (like multithreading)
All I need to do in a shell script
the child process is a function
can any one help me on this

thanks in advance
# 2  
Old 03-23-2010
Something like this?

Code:
call_all()
      {
 child_proc1.sh &
 child_proc2.sh &
 child_proc3.sh &
 child_proc4.sh &
     }
parent_script.sh && call_all

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. Shell Programming and Scripting

Starting all the components simultaneously through script

Hi Folks , I have the below script that will start the components one by one by giving an interval of few seconds that if first component is started then there is interval of few seconds and then the second component is started , but by this way it takes time, i want to make the process faster... (8 Replies)
Discussion started by: punpun66
8 Replies

3. Programming

Child threads communicating with main thread via pipes

I have a simple client/server program I am using for learning purposes. I have it setup so that after server is setup and listening it than goes into a loop where it accepts incoming client connections. After each connection, the client socket is than passed to a thread routine where it can be... (3 Replies)
Discussion started by: Majortom71
3 Replies

4. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

5. Homework & Coursework Questions

Need help with deleting childīs parent and child subprocess

1. The problem statement, all variables and given/known data: I need to make an program that in a loop creates one parent and five children with fork(). The problem i'm trying to solve is how to delete the parent and child of the childīs process. 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: WhiteFace
0 Replies

6. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

7. Shell Programming and Scripting

starting a bash session as child process to another bash session from a process

Hi I want to do something that might sound strange. I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts. The process doesn't have any terminal associated with it. One thing I don't know how to do is to start a... (5 Replies)
Discussion started by: alirezan
5 Replies

8. UNIX for Advanced & Expert Users

Threads and Threads Count ?

Hi all, How can I get the list of all Threads and the Total count of threads under a particular process ? Do suggest !! Awaiting for the replies !! Thanks Varun:b: (2 Replies)
Discussion started by: varungupta
2 Replies

9. Post Here to Contact Site Administrators and Moderators

The way for starting new threads is not clear

Hi I appreciate you for providing this type of good resource for Unix. But the way how to post a new thread is not clear for a registered user. No where in the forums page I could find the link or any button for this purpose like "NEW THREAD" shall any one go through 'contact us' for... (1 Reply)
Discussion started by: saravana
1 Replies

10. Solaris

Running 2 apaches simultaneously

Hello, I want to run 2 apaches simultaneusly in a system, one operating with port 80 and the other one with 85, i already have the configuration files ready and i tryed something i saw in a manual, like this: first i start apache as normal: /usr/local/etc/httpd/bin/apachectl start the i... (2 Replies)
Discussion started by: sx3v1l_1n51de
2 Replies
Login or Register to Ask a Question