Re: [TTY] exclusive mode question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 09/06/05 10:49 +0200, moreau francis écrivit:
> Hi
> 
> 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;
in drivers/char/tty_io.c:tty_open

Which sources are you looking at?

Regards,
Frederik Deweerdt

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux