Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #define MAX_LINE 80/*The maximum leught command */
- int main(void)
- {
- char *args[MAX_LINE/2 + 1];command line arguments*/
- int should_run = 1;/* flag to deterimine when to exit program*/
- while (should_run){
- printf("osh>");
- fflush(stdout);
- //**
- *after reading user input, the steps are:
- * (1) fork a child process using fork()
- * (2) the child rocess will invoke execvp()
- */
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement