The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to write script to create directory snail UNIX for Dummies Questions & Answers 0 03-27-2008 01:29 PM
programatic ways to create background processes in C/C++ ipzig High Level Programming 1 11-03-2007 08:10 AM
script to run different shells which run different processes mochi UNIX for Advanced & Expert Users 2 06-15-2006 09:25 AM
Read/write locks within and between processes. Can you help? adamb High Level Programming 3 02-13-2006 08:35 AM
Need a script to kill processes with PPID of 1 lbaysdon Shell Programming and Scripting 5 04-13-2005 09:01 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-04-2007
Registered User
 

Join Date: Jul 2007
Posts: 52
how i write script to create 30 processes

helo i make one process for com port . in that i create two thread one for reading data and another for writing data to com port.
now i want to write a script which create 30 processes for handling 30 com port.
is it good solution for handling 30 com port.
Thx & Regards,
Amit
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-04-2007
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,419
shell scripts let you create child processes, not threads. You can create threads using a compiled language like C.

Whether creating 60 processes is a good idea or not depends on a lot of factors, mostly available system resources.

Instead of telling us what you think you need to do, tell us what you are required to do

example: listen to 30 COM ports and write files based on their data streams.
Reply With Quote
  #3 (permalink)  
Old 10-20-2007
Registered User
 

Join Date: Jul 2007
Posts: 52
how i write a script to create 30 same

Sir,
i have 30 com ports which are connected with modems(each modem has rs-232 interface).
at server side i want to write application using c or c++ which monitors all 30 com ports and when data come on particular port , it reads it(data comming in form of packets).
so when packets come on particular port, process of that port extract the packet and send to another modem via another port.

so i m thinking to create one com process and after that using shell script i want to create 30 same com process.

for exaple for com port one CCU1 process. like i want to create seperate processes for each port.
functionality of each process is same read data from the com port and write data on the particular com port.
so how i write such script to create 30 com processes from one process.
Thanks and Regards,
Amit

QUOTE=jim mcnamara;302139125]shell scripts let you create child processes, not threads. You can create threads using a compiled language like C.

Whether creating 60 processes is a good idea or not depends on a lot of factors, mostly available system resources.

Instead of telling us what you think you need to do, tell us what you are required to do

example: listen to 30 COM ports and write files based on their data streams.[/quote]
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0