• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

C++ Piping

QurazyQuisp

Platinum Member
So, I'm right a program that will basically take a text file and pipe it to a process (Only a small part of the program). I using both fork() and pipe() so I have a parent & child process, and pipes between them. However, I'm not sure how to actually "give" the information (text) to the child process. I've tried using write() to send it, and it seems to writing correctly, however it doesn't seem as if the process is receiving it.

I've been tipped by a friend to use dup/dup2 however I'm not sure exactly what they do. The man pages don't seem like much help.
 
My old Operating Systems book gives an example with just read() and write() and fork(). This site has several such examples.
 
Back
Top