Category : pipe

I’m trying to connect the Stockfish 14 UCI to my C++ program that takes the data from the UCI and properly displays it onto a chess board using SDL2. I’ve had major troubles with this. I’ve tried the _popen function but that function doesn’t allow me to input multiple commands. I’ve also tried the Windows ..

Read more

I’m making a software that runs stockfish. So far I have: std::string exec(std::string cmd) { FILE* pipe = _popen(cmd.c_str(), "r"); if (!pipe) return "ERROR"; char buffer[128]; std::string result = ""; while (!feof(pipe)) { if (fgets(buffer, 128, pipe) != NULL) result += buffer; } return result; } int main(){ std::cout << exec("stockfish position startpos moves e2e4") ..

Read more

I have 2 different C++ applications that collect data from 2 completely different sensor systems (modified SDKs) I would like to create a program for sensor data collection that runs both programs on different threads. Then, at a fixed sample rate call each asynchronous program for its latest reading and store them together as a ..

Read more

I’m trying to make a program where parent process creates 3 child processes creates another process to monitor the processes. The monitoring child process executes char *argv[6] = {"ps", "-p", "p1,p2,p3", "r", "-o", "pid,%cpu,%mem,stat"}; execvp(argv[0], argv); and sends them to parent with pipe lining and redirecting stdout to stdin. But I am having problem as ..

Read more