aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-05 03:01:28 +0000
committerChristopher Faylor <me@cgf.cx>2003-01-05 03:01:28 +0000
commit75af5794ef0513c9353093bd486e470e3873649f (patch)
tree34415df7e8f3bfea9eab7e8d54e796ca31fdc21e
parent69165d276e3498d3a9fd50c6f3b66531ab306b85 (diff)
downloadnewlib-github/unlabeled-1.46.4.zip
newlib-github/unlabeled-1.46.4.tar.gz
newlib-github/unlabeled-1.46.4.tar.bz2
Replace is_fs_device with is_fs_special throughout.github/unlabeled-1.46.4unlabeled-1.46.4
* 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/pinfo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 89b683f..3599015 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -29,11 +29,13 @@ struct commune_result
{
char *s;
int n;
+ HANDLE handles[2];
};
enum picom
{
- PICOM_CMDLINE = 1
+ PICOM_CMDLINE = 1,
+ PICOM_FIFO = 2
};
class _pinfo
@@ -136,7 +138,7 @@ public:
inline void setthread2signal (void *thr) {thread2signal = (pthread *) thr;}
void commune_recv ();
- commune_result commune_send (DWORD);
+ commune_result commune_send (DWORD, ...);
bool alive ();
char *cmdline (size_t &);