![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A program to trace execution of another program | jiten_hegde | High Level Programming | 3 | 08-19-2008 05:26 AM |
| How to write to stdin of another program (program A -> [stdin]program B) | vvaidyan | UNIX for Dummies Questions & Answers | 3 | 08-02-2008 05:21 PM |
| C++ How to use pipe() & fork() with stdin and stdout to another program | vvaidyan | High Level Programming | 2 | 05-16-2008 07:30 PM |
| How to clear the content of a pipe (STDIN) after it is written to another program? | vvaidyan | High Level Programming | 10 | 05-15-2008 07:08 PM |
| how can i write process_pool program? | hit | High Level Programming | 4 | 06-17-2002 03:36 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to write to stdin of another program (program A -> [stdin]program B)
Hi,
Program A: uses pipe() I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using: * child -> dup2(fd[1], STDOUT_FILENO); -> execl("/path/PROGRAM B", "PROGRAM B", NULL); * parent -> char line[100]; -> read(fd[0], line, 100); Question: --------- How to write to stdin of PROGRAM B from PROGRAM A? * should I use a different pipe? * how to I read stdin in PROGRAM B? using cin? Thanks in advance, Vivek |
|
||||
|
It's against the:
Simple rules of the UNIX.COM forums: to double posts questions, continue here: How to write to stdin of another program (program A -> [stdin]program B) Thread close |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|