summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/userprog/syscall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c
index 65ebc7e..0df46f4 100644
--- a/src/userprog/syscall.c
+++ b/src/userprog/syscall.c
@@ -9,6 +9,7 @@
#include "filesys/filesys.h"
#include "filesys/off_t.h"
#include "lib/pid_t.h"
+#include "userprog/process.h"
#include "threads/init.h"
#include "threads/malloc.h"
@@ -144,9 +145,9 @@ close (int fd_i)
}
static pid_t
-exec (const char *file_name UNUSED)
+exec (const char *file_name)
{
- return -1;
+ return process_execute (file_name);
}
// cast to TYPE and deref argument N from f->esp