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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -