fork download
  1. #include <unistd.h>
  2. #include <iostream>
  3.  
  4. int main() {
  5. int x = execl("ls", "");
  6. std::cout << x << std::endl;
  7. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
-1