| ||||||
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 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:
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 machine2. 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.
| ||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |