code_junkie

The exec family

Nov 11th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.09 KB | None | 0 0
  1. int ret;
  2. ret = execl ("/bin/ls", "ls", "-1", (char *)0);
  3.  
  4. int fd = 1;
  5. dup(fd);
  6. close(fd);
Add Comment
Please, Sign In to add comment