summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--term/ChangeLog5
-rw-r--r--term/users.c18
2 files changed, 13 insertions, 10 deletions
diff --git a/term/ChangeLog b/term/ChangeLog
index b01808e7..8536ff51 100644
--- a/term/ChangeLog
+++ b/term/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 24 14:44:57 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * users.c (open_hook): Always assert DTR (even if O_NONBLOCK).
+ Don't return any errors if O_NONBLOCK and we don't have carrier.
+
Tue Oct 8 22:46:09 1996 Miles Bader <miles@gnu.ai.mit.edu>
* users.c (open_hook): Zero WINDOW_SIZE during initialization.
diff --git a/term/users.c b/term/users.c
index d438980e..0350b13a 100644
--- a/term/users.c
+++ b/term/users.c
@@ -143,10 +143,8 @@ open_hook (struct trivfs_control *cntl,
return EBUSY;
}
- /* Wait for carrier to turn on. */
- while (((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL))
- && !(flags & O_NONBLOCK)
- && !cancel)
+ /* Assert DTR if necessary. */
+ if ((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL))
{
err = (*bottom->assert_dtr) ();
if (err)
@@ -154,14 +152,14 @@ open_hook (struct trivfs_control *cntl,
mutex_unlock (&global_lock);
return err;
}
- cancel = hurd_condition_wait (&carrier_alert, &global_lock);
}
+
+ /* Wait for carrier to turn on. */
+ while (((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL))
+ && !(flags & O_NONBLOCK)
+ && !cancel)
+ cancel = hurd_condition_wait (&carrier_alert, &global_lock);
- if ((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL))
- {
- mutex_unlock (&global_lock);
- return EWOULDBLOCK;
- }
if (cancel)
{
mutex_unlock (&global_lock);