Re: [TTY] exclusive mode question
From: Frederik Deweerdt
Date: Thu Jun 09 2005 - 04:38:06 EST
Le 09/06/05 10:49 +0200, moreau francis écrivit:
> When a process open a tty in exclusive mode (using ioctl(X, TIOCEXCL)), can the
> process be sure to be the only one using this tty ?
> If so I can't find in kernel code any checks in "tty_open" method for verifying
> that the tty has not been opened previously by another process when
> "TTY_EXCLUSIVE" flag is set.
I've just greped and I found :
if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !capable(CAP_SYS_ADMIN))
retval = -EBUSY;
Which sources are you looking at?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/