Jose Velasquez

Generation

generate functionSat, 17 Jun 2023

como ejecutar pcp_recovery_node -h 192.168.1.48 -p 9898 -U pgpool -n 1 con contraseña

const char *cmd = "python3 -u /home/pi/Programs/PCP/pcp_recovery_node.py -h 192.168.1.48 -p 9898 -U pgpool -n 1"; std::cout << "Executing command: " << cmd << std::endl; FILE *fp; char path[1035]; fp = popen(cmd, "r"); if (fp == NULL) { std::cout << "Failed to run command" << std::endl; return; } while (fgets(path, sizeof(path), fp) != NULL) { std::cout << path << std::endl; } pclose(fp);

Questions about programming?Chat with your personal AI assistant