mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +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 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)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = VOP_OPEN(res, flags, getcred());
|
err = VOP_OPEN(&tmp, flags, getcred());
|
||||||
if (err)
|
if (err) {
|
||||||
VOP_RELEASE(*res);
|
VOP_RELEASE(tmp);
|
||||||
|
} else {
|
||||||
|
*res = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ static void removefromlist(proc_t *pgrp, proc_t *proc) {
|
|||||||
|
|
||||||
void jobctl_setctty(proc_t *proc, void *_ctty) {
|
void jobctl_setctty(proc_t *proc, void *_ctty) {
|
||||||
tty_t *tty = _ctty;
|
tty_t *tty = _ctty;
|
||||||
__assert(tty);
|
|
||||||
|
|
||||||
bool intstatus = interrupt_set(false);
|
bool intstatus = interrupt_set(false);
|
||||||
spinlock_acquire(&proc->jobctllock);
|
spinlock_acquire(&proc->jobctllock);
|
||||||
|
|||||||
Reference in New Issue
Block a user