I have a QWidget which inside it creates a process using fork. I use the new process to run a secondary executable and to communicate between the two processes I create some pipes. I am making the pipes so the communication can only go one-way, that way I can pass into the secondary applications input from my main application since I cannot write to stdin to answer its inputs.
Anyways, the problem I am having is I am trying to close of some of the ends of the pipes, but when I call the close function with its argument
close( int )
close( int )
To copy to clipboard, switch view to plain text mode
the compiler doesn't let me compile because it says QWidget::close doesn't take any arguments. The close I am trying to use is located in unistd.h. I have tried
std::close( int );
unistd::close( int );
std::close( int );
unistd::close( int );
To copy to clipboard, switch view to plain text mode
but std does not contain close and unistd does not appear to have a namespace or whatever its called. So how can I get around the confusion of which close I want to use. Thanks for your help and input!
Bookmarks