How to change default stdin to a process?

Joined
May 6, 2011
Messages
1
Reaction score
0
Hi,

I have two processes (one written in tcl (wish process) and the other is a C Program (a.out))
I am opening the second process as a sub process from wish process by using pipe as follows

set pipe [open "| sh -c { $execCommand } " r+ ]

So, when i want to send a message to process 2, i can use "puts $pipe <message>" and the message can be received at process2 at fd 0 . i.e., "read(0,buff,size) in process2"

Now my query is "How to change that default fd 0 at receiving side? i.e., I want to receive the message when I give read((5,buff,size)) on process2???"

Thanks in Advance,
rAzoRbaCK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top