Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

390
Vistas
_popen opens terminal for a split second c++

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");
}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Maybe popen() isn't what you need. Take a look at the _spawn family of functions (https://docs.microsoft.com/en-us/cpp/c-runtime-library/spawn-wspawn-functions), maybe that's what you're looking for?

There are also some cross-platform C libraries out there for executing other programs, that already invented the wheel you are trying to reinvent. For example:

  • https://github.com/DaanDeMeyer/reproc
  • https://github.com/brechtsanders/crossrun
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda