Jose Velasquez

Generation

generate functionSun, 18 Jun 2023

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

const char *cmd = "pcp_recovery_node -h 192.168.1.48 -p 9898 -U pgpool -n 1"; int wstatus; pid_t pid; pid = fork(); if (pid == 0) { execl("/bin/sh", "sh", "-c", cmd, (char *)0); exit(127); /* only if execv fails */ } else { waitpid(pid, &wstatus, 0); if (WIFEXITED(wstatus)) { printf("exit status %d\n", WEXITSTATUS(wstatus)); } }

Questions about programming?Chat with your personal AI assistant