fix jobctl /dev/tty stuff

This commit is contained in:
Matheus
2024-05-22 19:23:37 -03:00
parent a493fcb63d
commit 71a38176d1
2 changed files with 8 additions and 5 deletions
+8 -4
View File
@@ -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;
}
-1
View File
@@ -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);