Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

385
Views
_popen abre la terminal por una fracción de segundo c++

Tengo un programa servidor/cliente. Mi cliente usa _popen para ejecutar comandos. Cuando envío un comando del servidor al cliente, mi cliente abre una nueva terminal (cmd) y luego la cierra. Todo esto sucede en un segundo.

No quiero que mi programa cliente abra y cierre una terminal al ejecutar un comando. No quiero ninguna terminal cuando ejecuto un comando en mi cliente con _popen . ¿Cómo puedo evitar que mi cliente abra un nuevo terminal?

Cliente:

 FILE* f = _popen(command, "r"); if (f == NULL) { printf("error _popen 2\n"); }
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Tal vez popen() no sea lo que necesita. Eche un vistazo a la familia de funciones _spawn ( https://docs.microsoft.com/en-us/cpp/c-runtime-library/spawn-wspawn-functions ), ¿quizás eso es lo que está buscando?

También existen algunas bibliotecas C multiplataforma para ejecutar otros programas, que ya inventaron la rueda que está tratando de reinventar. Por ejemplo:

  • https://github.com/DaanDeMeyer/reproc
  • https://github.com/brechtsanders/crossrun
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!