summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-09-21 13:30:18 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-09-21 13:30:18 +0200
commit23b32a7beec41fd8c8eae20b221c1cb2b536f345 (patch)
tree4fd9a3dde52505d5bfd513c4791d633d627eb7f4
parent40c49e36b845ed35c7151c2077f451fba362f98e (diff)
Fix test for term open mode
* term/users.c (S_term_open_ctty): Properly test for `openmodes` containing at least O_READ or O_WRITE.
-rw-r--r--term/users.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term/users.c b/term/users.c
index 529693e8..e51c1113 100644
--- a/term/users.c
+++ b/term/users.c
@@ -438,7 +438,7 @@ S_term_open_ctty (mach_port_t arg,
pthread_mutex_lock (&global_lock);
- if (!cred->po->openmodes & (O_READ|O_WRITE))
+ if (!(cred->po->openmodes & (O_READ|O_WRITE)))
{
pthread_mutex_unlock (&global_lock);
err = EBADF;