【发布时间】:2015-12-10 15:41:13
【问题描述】:
我正在从事 Pintos Project #2。我已经实现了大部分系统调用。在 exec 系统调用中,有一个测试 exec-missing 根据文件中的注释检查:
/* Tries to execute a nonexistent process.
The exec system call must return -1. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
msg ("exec(\"no-such-file\"): %d", exec ("no-such-file"));
}
我不知道如何在我的执行代码中检查这一点。我已经正确检查了帧指针,可能缺少什么?
【问题讨论】: