_popen opens terminal for a split second c++

Viewed 48

I have a server/client program. My client uses _popen to execute commands. When I send a command from server to client, my client opens a new terminal(cmd) and then closes it. All of this happens within a second.

I don't want my client program to open and close a terminal when executing a command. I don't want any terminal when I execute a command on my client with _popen. How can I prevent that my client opens a new terminal?

Client:

FILE* f = _popen(command, "r");
if (f == NULL)
{
    printf("error _popen 2\n");
}
1 Answers
Related