#
6730553a |
|
14-Nov-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Already set tty::lock() in init_driver(). This makes it always safe to be used. * Added tty::ref_count. Each cookie keeps a reference. Only when a cookie is freed the reference is surrendered. A tty is considered used as long as it is still referenced. This allows to access a tty through the cookie, even if it already has been closed. * Fixed tty_deselect(). It was keeping registered select events when called after the cookie has been closed. The referenced select_sync structure would become invalid and later attempts to send select notifications for the tty could crash. Fixes #3126. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28651 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ac7f526d |
|
09-May-2008 |
François Revol <revol@free.fr> |
- dump termios struct for ttys - implement VMIN & VTIME, at least it seems to work but it's 4am and it's overly weird, so please review. See http://man.cx/termios and http://www.unixwiz.net/techtips/termios-vmin-vtime.html . git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25408 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b48c06f |
|
09-May-2008 |
François Revol <revol@free.fr> |
- dump winsize info too. - prepare for VTIME and VMIN handling: allow waiting with timeout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25405 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
06b7c7ff |
|
24-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Set reasonable terminal flag defaults. This makes telnetd fully usable again. * Publish /dev/ptmx. Opening it will open a fresh pty master. In principle /dev/pt/ is obsolete now, but I guess we keep it around for compatibility with BeOS. Though there shouldn't be many applications opening a pty, that we might be interested in... * New ioctls B_IOCTL_GET_TTY_INDEX (returns the tty index) and B_IOCTL_GRANT_TTY (grants tty slave access rights). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25133 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6cef245e |
|
22-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Detemplatized ConditionVariable{Entry}. Merged them with their respective Private* base class. * Changed sigwait() and sigsuspend() to use thread_block() instead of a condition variable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e8429ec9 |
|
03-Oct-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added debugger command "tty", which dumps some info about a tty. * RequestOwner was removing the wrong request from the second queue, which could cause the list structure to become invalid and result in bug #1526. * In the writer loops we do now call tty_notify_if_available() when we're potentially going to wait and had written something before, so that a waiting reader will be woken up also when we write more bytes than fit into the ring buffer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22421 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
eb138dc9 |
|
30-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved the select_sync_pool from tty_cookie to tty. No need to have one per cookie. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22392 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f6b4f3e |
|
28-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* When canonical input processing is enabled reads should only return anything, if a line is available. Fixes bug #1483. * Replaced the request owner waiting semaphore by a condition variable and removed the now no longer needed SemaphorePool. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22357 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
923efaa8 |
|
05-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* We store the ID of the controlling terminal and the foreground process group ID with the session and let the terminal update them. * Added an "orphaned" flag to the process_group structure and code to maintain it. * Handle the death of a controlling process correctly: The foreground process group gets a SIGHUP and all newly-orphaned process groups containing at least one stopped processes are sent SIGHUP+SIGCONT. * The tty handles the O_NOCTTY flag correctly, now. * The tty handles reads/writes from processes from other sessions correctly, now. * Handle tcsetpgrp() from background processes correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22187 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
696c54d0 |
|
28-Jul-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved members pgrp_id, termios, window_size from the tty structure to the new structure tty_settings of which there's only one instance per master/slave tty pair. Previously the existence of two instances of those members caused several kinds of problems, e.g. the Terminal setting the window size on the master and CLI programs readings the unchanged values from the slave. E.g. less correctly adjusts the display when the Terminal size changes, now. * Reorganized writing to a TTY. We do no longer handle writes to master and slave the same way. Writes to the master are "input" and need to be processed differently from writes to the slave ("output"). Before, both were processed first as output then as input, which caused incorrect behavior. E.g. CRs were not echoed correctly. * Added canonical ERASE (backspace) and KILL (clear line) processing. Couldn't really see it work. glibc's fgets() seems to read single chars, so that we never have anything in the line buffer. * Added handling for EOF. Works well with Be's Terminal, ours seems to write an ESC sequence instead of the EOF char (Ctrl-D), though. * Extended output processing support (ECHOE, ECHOK, ECHONL, OCRNL, ONLRET, OLCUC). * Writes use user_memcpy() now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21735 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6632e1f4 |
|
17-May-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Changed type of "bytesNeeded" to size_t whereever it's used. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
27a55239 |
|
20-Mar-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Dealt with (hopefully) all open/close race conditions. * Implemented unblocking of pending operations when closing a cookie. Needed to change the simple one reader semaphore, one writer semaphore strategy for blocking to a request queue based approach (otherwise unblocking would have been really hairy). * Implemented select() support. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11931 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fa42f1c2 |
|
27-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Work in progress. Basic data exchange seems to work. Only slightly tested (moved data to and from pty <-> tty). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9087 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6b306033 |
|
23-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Added the beginnings of our TTY layer. After having had a look at our own Terminal code (former MuTerm), I even copied the original mess in /dev/tt/ and /dev/pt/. The /dev/tt/ entries could be created and removed on demand, though, but that can't be done yet. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9041 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6730553ae018003356b03f2d8500520671470bc7 |
|
14-Nov-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Already set tty::lock() in init_driver(). This makes it always safe to be used. * Added tty::ref_count. Each cookie keeps a reference. Only when a cookie is freed the reference is surrendered. A tty is considered used as long as it is still referenced. This allows to access a tty through the cookie, even if it already has been closed. * Fixed tty_deselect(). It was keeping registered select events when called after the cookie has been closed. The referenced select_sync structure would become invalid and later attempts to send select notifications for the tty could crash. Fixes #3126. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28651 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ac7f526d3cb3242e199de5c86a262b6c901feae8 |
|
09-May-2008 |
François Revol <revol@free.fr> |
- dump termios struct for ttys - implement VMIN & VTIME, at least it seems to work but it's 4am and it's overly weird, so please review. See http://man.cx/termios and http://www.unixwiz.net/techtips/termios-vmin-vtime.html . git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25408 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b48c06f261b637e3374693974b0565a73e0b225 |
|
09-May-2008 |
François Revol <revol@free.fr> |
- dump winsize info too. - prepare for VTIME and VMIN handling: allow waiting with timeout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25405 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
06b7c7ffe2bb0b87dc3afb9f0296b048807957ee |
|
24-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Set reasonable terminal flag defaults. This makes telnetd fully usable again. * Publish /dev/ptmx. Opening it will open a fresh pty master. In principle /dev/pt/ is obsolete now, but I guess we keep it around for compatibility with BeOS. Though there shouldn't be many applications opening a pty, that we might be interested in... * New ioctls B_IOCTL_GET_TTY_INDEX (returns the tty index) and B_IOCTL_GRANT_TTY (grants tty slave access rights). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25133 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6cef245eca821584f07f5a13558f51ec586852e8 |
|
22-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Detemplatized ConditionVariable{Entry}. Merged them with their respective Private* base class. * Changed sigwait() and sigsuspend() to use thread_block() instead of a condition variable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e8429ec9e65e68871a6aa998b07cce5c3cdb9c9e |
|
03-Oct-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added debugger command "tty", which dumps some info about a tty. * RequestOwner was removing the wrong request from the second queue, which could cause the list structure to become invalid and result in bug #1526. * In the writer loops we do now call tty_notify_if_available() when we're potentially going to wait and had written something before, so that a waiting reader will be woken up also when we write more bytes than fit into the ring buffer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22421 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
eb138dc9c4eb8ff406eb375bdb2ca7551afe1694 |
|
30-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved the select_sync_pool from tty_cookie to tty. No need to have one per cookie. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22392 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f6b4f3e1a392bc9dd18659bbd57d61a2eb84fd0 |
|
28-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* When canonical input processing is enabled reads should only return anything, if a line is available. Fixes bug #1483. * Replaced the request owner waiting semaphore by a condition variable and removed the now no longer needed SemaphorePool. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22357 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
923efaa872b9fe4e9e9cae87effe2af5c338b98a |
|
05-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* We store the ID of the controlling terminal and the foreground process group ID with the session and let the terminal update them. * Added an "orphaned" flag to the process_group structure and code to maintain it. * Handle the death of a controlling process correctly: The foreground process group gets a SIGHUP and all newly-orphaned process groups containing at least one stopped processes are sent SIGHUP+SIGCONT. * The tty handles the O_NOCTTY flag correctly, now. * The tty handles reads/writes from processes from other sessions correctly, now. * Handle tcsetpgrp() from background processes correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22187 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
696c54d0673fe190dbbae4323b48bf1b8d9c2beb |
|
28-Jul-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved members pgrp_id, termios, window_size from the tty structure to the new structure tty_settings of which there's only one instance per master/slave tty pair. Previously the existence of two instances of those members caused several kinds of problems, e.g. the Terminal setting the window size on the master and CLI programs readings the unchanged values from the slave. E.g. less correctly adjusts the display when the Terminal size changes, now. * Reorganized writing to a TTY. We do no longer handle writes to master and slave the same way. Writes to the master are "input" and need to be processed differently from writes to the slave ("output"). Before, both were processed first as output then as input, which caused incorrect behavior. E.g. CRs were not echoed correctly. * Added canonical ERASE (backspace) and KILL (clear line) processing. Couldn't really see it work. glibc's fgets() seems to read single chars, so that we never have anything in the line buffer. * Added handling for EOF. Works well with Be's Terminal, ours seems to write an ESC sequence instead of the EOF char (Ctrl-D), though. * Extended output processing support (ECHOE, ECHOK, ECHONL, OCRNL, ONLRET, OLCUC). * Writes use user_memcpy() now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21735 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6632e1f4826020d79c367405b99ad642fd3d1e45 |
|
17-May-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Changed type of "bytesNeeded" to size_t whereever it's used. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
27a5523990f922ce4cb423b63ef26d4379049423 |
|
20-Mar-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Dealt with (hopefully) all open/close race conditions. * Implemented unblocking of pending operations when closing a cookie. Needed to change the simple one reader semaphore, one writer semaphore strategy for blocking to a request queue based approach (otherwise unblocking would have been really hairy). * Implemented select() support. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11931 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fa42f1c2b9d66c327979c903b3881b6d53e9dc12 |
|
27-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Work in progress. Basic data exchange seems to work. Only slightly tested (moved data to and from pty <-> tty). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9087 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6b3060331448d3873bdd60566ff977cf2aaee798 |
|
23-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Added the beginnings of our TTY layer. After having had a look at our own Terminal code (former MuTerm), I even copied the original mess in /dev/tt/ and /dev/pt/. The /dev/tt/ entries could be created and removed on demand, though, but that can't be done yet. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9041 a95241bf-73f2-0310-859d-f6bbb57e9c96
|