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

391
Views
_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 answers
Answer question

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 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!