diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-05 03:01:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-05 03:01:24 +0000 |
commit | 33a1c6b13de507c52fd57a61262952e0f6bdff94 (patch) | |
tree | d7a1bf24c5b912be256d0ecf46ebe3c6eef2ba39 | |
parent | 599acdf975dd50f958a59f5afa06b3d8f892180f (diff) | |
download | newlib-unlabeled-1.88.2.zip newlib-unlabeled-1.88.2.tar.gz newlib-unlabeled-1.88.2.tar.bz2 |
Replace is_fs_device with is_fs_special throughout.github/unlabeled-1.88.2unlabeled-1.88.2
* Makefile.in (DLL_OFILES): Add fhandler_fifo.o.
* devices.h (fh_devices): Renumber some minor numbers to fit in 8 bits.
* dtable.cc (dtable::build_fhandler): Handle FH_FIFO. Set errno to ENODEV if
device not found.
* dtable::find_fifo: Define new function.
* dtable.h (dtable::find_fifo): Declare new function.
* fhandler.cc (fhandler_base::device_access_denied): Fix O_RDONLY test.
(fhandler_base::write): Use output file handle for writing.
(fhandler_base::fstat): Use is_fs_special rather than is_fs_device.
* fhandler.h (fhandler_base::is_fs_special): Rename from is_fs_device.
(fhandler_pipe): Make private elements protected so that fhandler_fifo can use
them too.
(fhandler_pipe::create): New function derived from make_pipe.
(fhandler_fifo): Add more needed elements.
(fhandler_pty_master::slave): Add to track slave device.
(fhandler_pty_master::get_unit): Define.
* fhandler_tty.cc (fhandler_tty_master::init): Register slave device.
(fhandler_pty_master::open): Ditto.
(symlink_info::parse_device): Handle fifo specially.
* pinfo.cc (_pinfo::commune_recv): Initial fifo implementation.
(_pinfo::commune_send): Ditto.
* pinfo.h (picom): Add PICOM_FIFO.
* pipe.cc (fhandler_pipe::close): Close input handle here specifically.
(fhandler_pipe::create): Rename from make_pipe. Create fhandlers rather than
fds.
(pipe): Use fhandler_pipe::create to create pipe.
(_pipe): Ditto.
* syscalls.cc (mknod): Accommodate fifos.
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 0ea762b..ec9926e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -61,6 +61,8 @@ fhandler_tty_master::init () { termios_printf ("Creating master for tty%d", get_unit ()); + slave = dev; + if (init_console ()) { termios_printf ("can't create fhandler"); @@ -1012,13 +1014,14 @@ fhandler_pty_master::open (path_conv *, int flags, mode_t) if (ntty < 0) return 0; - dev.setunit (ntty); + slave = *ttys_dev; + slave.setunit (ntty); cygwin_shared->tty[ntty]->common_init (this); inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE); set_flags ((flags & ~O_TEXT) | O_BINARY); set_open_status (); - termios_printf ("opened pty master tty%d<%p>", get_unit (), this); + termios_printf ("opened pty master tty%d", get_unit ()); return 1; } |