![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
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 |
| 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 to write to stdin of another program (program A -> [stdin]program B) | vvaidyan | High Level Programming | 1 | 04-30-2008 01:44 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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|