Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3.  
  4. #define MAX_LINE 80/*The maximum leught command */
  5.  
  6. int main(void)
  7. {
  8. char *args[MAX_LINE/2 + 1];command line arguments*/
  9. int should_run = 1;/* flag to deterimine when to exit program*/
  10.  
  11. while (should_run){
  12. printf("osh>");
  13. fflush(stdout);
  14.  
  15. //**
  16. *after reading user input, the steps are:
  17. * (1) fork a child process using fork()
  18. * (2) the child rocess will invoke execvp()
  19. */
  20.  
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement