hw5: preparing for submission
This commit is contained in:
parent
88a84fc310
commit
2df7f103a5
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@ process_execute (const char *file_name)
|
|||
}
|
||||
strlcpy(program_name, file_name, i+1);
|
||||
|
||||
struct file* f = filesys_open (program_name);
|
||||
if (f == NULL) {
|
||||
return TID_ERROR;
|
||||
}
|
||||
file_close(f);
|
||||
|
||||
/* Create a new thread to execute FILE_NAME. */
|
||||
tid = thread_create (program_name, PRI_DEFAULT, start_process, fn_copy);
|
||||
if (tid == TID_ERROR)
|
||||
|
|
Reference in a new issue