Advertisement
Guest User

Untitled

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