From 4f27e288c55cd54a2759a59d06a52ed44dac494b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 31 Jan 2005 10:28:55 +0000 Subject: * cygheap.h (class cygheap_fdenum): New class to enumerate used fhandlers. * dtable.h (class dtable): Add cygheap_fdenum as friend class. * fhandler.h (fhandler_base::get_proc_fd_name): New virtual method to return a name for /proc//fd. (fhandler_socket::get_proc_fd_name): Ditto. (fhandler_pipe::get_proc_fd_name): Ditto. (fhandler_virtual::opendir): Make virtual method. (fhandler_process::opendir): New method. * fhandler.cc (fhandler_base::get_proc_fd_name): New method. * fhandler_process.cc: Include ctype.h. (PROCESS_FD): Define. (process_listing): Add "fd". (fhandler_process::exists): Fix comment. Return 1 in case of "fd" directory. Handle files below "fd". (fhandler_process::fstat): Drop "self" handling. Set correct link count for directories. (fhandler_process::opendir): New method to handle "fd" directory. (fhandler_process::readdir): Add "fd" handling. (fhandler_process::open): Drop "self" handling. (fhandler_process::fill_filebuf): Ditto. Add "fd" handling. Fix "maps" output string. * fhandler_registry.cc (fhandler_registry::fstat): Set correct link count for directories. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method. * path.cc (symlink_info::set): Fix thinko. * pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout. Drop local path variable in PICOM_FIFO case. Fix debug output. Close handles as early as possible. Add PICOM_FDS and PICOM_FD handling. (_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling. (_pinfo::fd): New method. (_pinfo::fds): New method. * pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD. (_pinfo::fd): Declare. (_pinfo::fds): Declare. * pipe.cc (fhandler_pipe::get_proc_fd_name): New method. --- winsup/cygwin/pinfo.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/pinfo.h') diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 88442ca22..705a1a599 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -25,7 +25,9 @@ enum picom PICOM_CMDLINE = 1, PICOM_FIFO = 2, PICOM_CWD = 3, - PICOM_ROOT = 4 + PICOM_ROOT = 4, + PICOM_FDS = 5, + PICOM_FD = 6 }; #define EXITCODE_SET 0x80000000 @@ -108,6 +110,8 @@ public: void commune_recv (); commune_result commune_send (DWORD, ...); bool alive (); + char *fd (int fd, size_t &); + char *fds (size_t &); char *root (size_t &); char *cwd (size_t &); char *cmdline (size_t &); -- cgit v1.2.3