Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
handling multiple processes

Posted by gurudatt (gurudatt), 12 March 2008
Hello,

i really need urgent help on this.

i need to spawn 1 process on VxWorks and 1 on windows and i need to get ouputs from both of these and then combine these outputs.

my problem is how do i get these outputs if i span them on the same console.

If i spawn them on different consoles then  dont i loose the output? how do i capture that?


Posted by admin (Graham Ellis), 12 March 2008
on 03/12/08 at 14:25:09, gurudatt wrote:
Hello,

i really need urgent help on this.



Hello - I have posted the following before - in many different ways -  but it seems that you may not have seen it or understood how we can and cannot help you here ...

Quote:
Standard text:
Please do not ask for urgent or a.s.a.p. assistance here - we're not set up to provide a rapid response service, and in any case we answer questions as soon as we practically can.  Customers of Well House Consultants (who host this site) are very welcome to email me if there are any truely urgent / critical issues and I will do my very best to help as quickly as I can.  Freeloaders who ask me to prioritise giving them support without charge over and above my "day job" are being very cheaky!


I'm afraid I don't recognise you as one of our customers, so I do have to leave your question until I have a chance to look at it - that's something I am usually able to do within a day or two, but it may be a little longer this week.  If you are able to wait for our free service, please post a follow up to let me know and include some of the sample code so that I can help you quickly and efficiently sort out what the issues are.

Posted by gurudatt (gurudatt), 13 March 2008
1. spawn telnet "targetname" -- on remote machine
2. set id1 $spawn_id
3. spawn "cmd.exe" -- on local machine
4. set id2 $spawn_id

5. send -i $id1  *.cmd
6. send -i $id2  *.exe

Problem: since i have both the commands being sent on the same console they get mixed up. how can i get the output that is got from both the commands sent on different targets.

If this is not possible can i get the output if i start the *.exe on a different console by saying  

send -i $id2 "start *.exe".

Wud be really happy if you could suggest something.

Thanks in advance

Posted by admin (Graham Ellis), 13 March 2008
set log_user to 0, and puts your expect_out(buffer) to two different channels.

Posted by gurudatt (gurudatt), 14 March 2008
thanks.

one more problem is that the exe on windows process never terminates and so i cannot expect for a prompt again.

i am interested in the output which i get after the process on Vxworks machine is obtained. i am trying to get both of these via expecting on multiple processes but am not succeeding.

expect {
-i $id1 { }
-i $id2 { }
timeout {continue}
}

could you suggest as to what might be wrong and which is the better way i shud be doing it.

Posted by admin (Graham Ellis), 14 March 2008
Shouldn't you be telling it what to expect as well as where to expect it from and what to do it you get it?



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho