c++ - Using popen to write in a pipe only send data when pipe is closed -


I am using popin to open a writing pipe and send commands to an application. The problem is that when I turn off the pipe, the commands are sent only to the app.

  FILE * fp = open (target_app, "w"); Fwrite (command, 1, command. (Size), fp); Getchar (); // Wait for a key, because I do not want to end the application pclose (FP); // At this point, the command is sent  

What could be wrong?


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -