mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
fix jobctl /dev/tty stuff
This commit is contained in:
+8
-4
@@ -100,13 +100,17 @@ int vfs_mount(vnode_t *backing, vnode_t *pathref, char *path, char *name, void *
|
||||
}
|
||||
|
||||
int vfs_open(vnode_t *ref, char *path, int flags, vnode_t **res) {
|
||||
int err = vfs_lookup(res, ref, path, NULL, 0);
|
||||
vnode_t *tmp = NULL;
|
||||
int err = vfs_lookup(&tmp, ref, path, NULL, 0);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = VOP_OPEN(res, flags, getcred());
|
||||
if (err)
|
||||
VOP_RELEASE(*res);
|
||||
err = VOP_OPEN(&tmp, flags, getcred());
|
||||
if (err) {
|
||||
VOP_RELEASE(tmp);
|
||||
} else {
|
||||
*res = tmp;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ static void removefromlist(proc_t *pgrp, proc_t *proc) {
|
||||
|
||||
void jobctl_setctty(proc_t *proc, void *_ctty) {
|
||||
tty_t *tty = _ctty;
|
||||
__assert(tty);
|
||||
|
||||
bool intstatus = interrupt_set(false);
|
||||
spinlock_acquire(&proc->jobctllock);
|
||||
|
||||
Reference in New Issue
Block a user