summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-09-07 17:12:29 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-09-07 17:12:29 +0000
commit270ba6ed9ba03f213d46660e528911fb595088ca (patch)
tree9bae99e8f7f0a90fb053e87242984f4301172037
parentbd0d1e7c784b0cc0845936c57aa84b99ed2493c7 (diff)
(trivfs_S_io_write): Start pending output before blocking.
-rw-r--r--term/users.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/term/users.c b/term/users.c
index 4eb61be8..b61a98e0 100644
--- a/term/users.c
+++ b/term/users.c
@@ -70,6 +70,17 @@ struct protid_hook
pid_t pid, pgrp;
};
+void
+init_users ()
+{
+ cttyid = ports_allocate_port (term_bucket, sizeof (struct port_info),
+ cttyid_class);
+ mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE,
+ &async_icky_id);
+ mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &async_id);
+}
+
+
static error_t
open_hook (struct trivfs_control *cntl,
uid_t *uids, u_int nuids,
@@ -94,6 +105,8 @@ open_hook (struct trivfs_control *cntl,
termstate.c_cflag |= CREAD | CS8 | HUPCL;
bcopy (ttydefchars, termstate.c_cc, NCCS);
+
+ termflags |= NO_OWNER;
}
else if (termflags & EXCL_USE)
{
@@ -380,11 +393,14 @@ trivfs_S_io_write (struct trivfs_protid *cred,
for (i = 0; i < datalen; i++)
{
while (!qavail (outputq) && !cancel)
- cancel = hurd_condition_wait (outputq->wait, &global_lock);
+ {
+ start_output ();
+ cancel = hurd_condition_wait (outputq->wait, &global_lock);
+ }
if (cancel)
break;
- output_character (data[i]);
+ write_character (data[i]);
}
*amt = i;