Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. int main()
  2. {
  3.     int[2]in;
  4.     int[2]out;
  5.     auto pin = pipe(in, 0);
  6.     auto pid = fork();
  7.     if (pid == 0)
  8.     {
  9.         //FIXME: il manque tous les dup2, je sais pas ou les mettre
  10.         char* const* args = { nullptr };
  11.         execvp(/*il me manque un truc la*/, args);
  12.         exit(0);
  13.     }
  14.     else
  15.     {
  16.         wait(&pid);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement