releasing file descriptors with the tty layer

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

 



if you have a multithreaded application and more than one thread is
operating on a file descriptor which represents a tty device at the
same time (one is used to polling it while another is used to interact
with it via read/write), doing a close() operation on the file will
not actually release the file descriptor in the kernel until all
things referencing it have completed (like the select()) ?

for example, say a background thread is doing select() on the fd while
another thread does close() followed by open() ... it is possible for
the close()/open() sequence on the tty to complete before the select()
is signaled and finishes ?  so in the tty layer, you'd see tty_open
called (via the open()) before tty_close (via the close() and the
select()) ?
-mike

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux