Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. pid_t sys_exec(const char *cmd_line) {
  2.     pid_t child_pid = process_execute(cmd_line);
  3.     if (child_pid != TID_ERROR) {
  4.         sema_down(&thread_current()->child_semaphore);
  5.         bool load_success = thread_current()->child_load_success;
  6.         thread_current()->child_load_success = false;
  7.         if (!load_success)
  8.             return -1;
  9.         else
  10.             insert_into_children(child_pid);
  11.     }
  12.     return child_pid;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement