Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pid_t sys_exec(const char *cmd_line) {
- pid_t child_pid = process_execute(cmd_line);
- if (child_pid != TID_ERROR) {
- sema_down(&thread_current()->child_semaphore);
- bool load_success = thread_current()->child_load_success;
- thread_current()->child_load_success = false;
- if (!load_success)
- return -1;
- else
- insert_into_children(child_pid);
- }
- return child_pid;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement