Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAXLINE 80 /* The maximum length command */
- int main(void) {
- char *args[MAXLINE/2 + 1]; /* command line with max 40 arguments */
- int should_run = 1; /* flag to determine when to exit program */
- printf("CS149 Shell from FirstName LastName\n"); /* replace w/ name*/
- while (should_run) {
- printf("FirstName-L3SID>"); /* prompt- replace FirstName and L3SID */
- fflush(stdout);
- /* After reading user input, the steps are:
- * (1) fork a child process using fork()
- * (2) the child process will invoke execvp()
- * (3) if command included &, parent will NOT invoke wait()
- */
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement