Added preliminary support for execve(). Updates to clone, fork, exit, task handling.

It turned out we used one version of kmalloc for malloc() and another for kfree()!
Now fixed.
Added parent-child relationship to tasks. Need to polish handling CLONE_PARENT and THREAD.
This commit is contained in:
Bahadir Balban
2008-11-19 12:59:52 +02:00
parent d182b5b35a
commit 46937eab88
39 changed files with 502 additions and 1192 deletions

View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <fs.h>
#include <task.h>
#include <vfs.h>
const char *pathdata_next_component(struct pathdata *pdata)
{
@@ -90,8 +91,11 @@ struct pathdata *pathdata_parse(const char *pathname,
comp->str = VFS_STR_ROOTDIR;
list_add_tail(&comp->list, &pdata->list);
/* Lookup start vnode is root vnode */
pdata->vstart = task->fs_data->rootdir;
if (task)
/* Lookup start vnode is root vnode */
pdata->vstart = task->fs_data->rootdir;
else /* If no task, we use the root mountpoint pivot vnode */
pdata->vstart = vfs_root.pivot;
/* Otherwise start from current directory */
} else {