Hi all,
How to write a program in which the main program spawns an executable, the 
main program need to pass data to the stdin of newly created process, then 
the new process will write something back to stdout. The stdout and stdin 
of new process can be manipulated using our parent process, but in all the 
tutorials and 
examples(https://github.com/joyent/libuv/blob/master/test/test-stdio-over-pipes.c#L141
 
) are written in such a way that at first the parent will read something 
from the child, then the parent write to the client. How can we write code 
where the parent needs to write first and read last

For a sample test, let our executable be an echo client like:
 #include<stdio.h>
 int main(){
char a[1024]="\0";
scanf("%s",a);  //read something from stdin
printf("%s",a);   // echo the data read from stdin to stdout
        return 0;
 }

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to