Help in co-process issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help in co-process issue
# 1  
Old 10-17-2007
Bug Help in co-process issue

Would you please tell me any link to learn about the concepts of coprocess from teh start and tell me briefly its applications, ie when, where, why to use co-process, and ive seen its applied to much in an ftp script. why its importnat in an ftp script

ill appreciata hihly your help. Thanks
# 2  
Old 10-17-2007
deleted - redundent

Last edited by porter; 10-17-2007 at 08:14 PM..
# 3  
Old 10-17-2007
I really hate to say it, but:

@porter: please do not answer to threads where you have obviously not the slightest idea of what is being spoken about.

Coprocesses are a device in the Korn Shell with which a background process can be started but (unlike usual background processes) communication between the father- and the child-process is being maintained.

By default coprocesses communicate via I/O-channel 4 and 5 with the father process. That means if a coprocess sends something to its <stdout> it can be in the father process by reading from channel 4 and writing to channel 5 in the father process appear in <stdin> of the child process.

The reason why this is valuable for scripts using ftp is because ftp is designed as an interactive program and not very well suited for batch operation. Hence one can start the ftp-process as coprocess and process the output and provide the input within the father process, quasi-simulating an interactive ftp-session.

Get yourself a good Korn Shell book (I'd strongly recommend Barry Rosenbergs "Hands-on Kornshell93 programming", very informative AND funny to read) to find about about the coprocess facility in ksh.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies

2. UNIX for Advanced & Expert Users

Issue with tracking successful completion of Child process running in background

Hello All, I am using Linux. I have two scripts: inner_script.ksh main_wrapper_calling_inner.ksh Below is the code snippet of the main_wrapper_calling_inner.ksh: #!/bin/ksh ppids=() ---> Main array for process ids. fppids=() ---> array to capture failed process ids. pcnt=0 --->... (5 Replies)
Discussion started by: dmukherjee
5 Replies

3. Shell Programming and Scripting

Issue Running UNIX process from CRON !!

Experts, Not sure whether the problem described here is related with Unix or is it with Oracle Installation. Here is the description of the issue: A new Unix server is setup as a part of Unix and Oracle upgradation activity for one of the Application, I work on. One strange thing is... (2 Replies)
Discussion started by: Oracle_User
2 Replies

4. Solaris

Process issue

They asked me to check is if process 'aanr' isn't working or hung!! $ ps -ef | grep aanr artsadm 11355 1 0 20:15:01 ? 0:00 /usr/local/bin/perl5 ./aanr artsadm 28203 1 0 Sep 06 ? 0:49 /usr/local/bin/perl5 ./aanr artsadm 24646 1 0 Sep 26 ? 0:00... (3 Replies)
Discussion started by: learner46
3 Replies

5. UNIX for Advanced & Expert Users

Issue while killing the process using autosys job

Hi, I have one autosys job that will retrieve the proccess id's and will kill those processess as follows, pid=`/usr/ucb/ps -auwwxx | grep MAIN |nawk '{print $2}'` kill -9 pid but after executing this particular job, its status is showing as TE(terminated) and the kill process is... (3 Replies)
Discussion started by: Kattoor
3 Replies

6. Shell Programming and Scripting

Snmp Process Monitoring Issue

Can someone please explain to me how come snmpwalk doesn't always find a running process that's on a remote server? I prefer to use snmp to monitor processes remotely because this doesn't require me to put a script on that remote box. but the problem is, there are times that my snmp command... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

8. Shell Programming and Scripting

Issue in mail sending process

Hi I created one CSV file and i need to append some message in the content of my mail. $sales=sales.dat $sales_csv=sales.csv $sales_report=sales.txt this is the command am using it. echo "sales for `date`"| read subject uuencode $sales $sales_csv | mailx -ms "${subject}."... (2 Replies)
Discussion started by: bobprabhu
2 Replies

9. UNIX for Dummies Questions & Answers

Multiple Process issue

Hello all, First of all, I want to thank the forum for being so helpful to me in many occasions. I have searched through the forums and the internet. I couldnt find a perfect solution for my issue. Here is what Im trying to do.. Im verifying a bunch of jobs whether they are completed or not... (1 Reply)
Discussion started by: jntgopal
1 Replies

10. UNIX for Advanced & Expert Users

Oracle library issue in child process

Hi, I am using a daemon from which I am forking 3 processes P1,P2,P3 out of which P3 is compiled with oracle lib32/libclntsh.so and P1,P2 are non database process. The Logic of daemon is that if any one goes down simply clean the other and refork all the 3 again. P3 is getting forked first time... (1 Reply)
Discussion started by: unisuraj
1 Replies
Login or Register to Ask a Question