* fhandler.cc (fhandler_base::get_proc_fd_name): Don't generate

"device:" entry.
	* fhandler.h (fhandler_socket::open): New method.
	(fhandler_pipe::open): New method.
	* fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of
	/proc/self.
	* fhandler_process.cc (fhandler_process::exists): Return -2 in
	case of symlinks, -3 for pipes and -4 for sockets.
	(fhandler_process::fstat): Handle pipes and sockets.
	(fhandler_process::open): Handle opening /proc/<pid>/fd.
	(fhandler_process::fill_filebuf): Generate empty names for
	non exisiting file descriptors.
	* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always
	generate "socket:[number]" strings as on Linux.
	(fhandler_socket::open): New method.
	(fhandler_socket::fstat): Always return socket type.
	* path.cc (symlink_info::set): Remove unused second parameter.
	(path_conv::check): Handle pipes and sockets in /proc.
	Set correct device type for AF_LOCAL sockets.
	* pinfo.cc (_pinfo::commune_recv): Generate empty names for
	non exisiting file descriptors.
	(_pinfo::fd): Ditto.
	* pipe.cc (fhandler_pipe::open): New method.
This commit is contained in:
Corinna Vinschen
2005-02-01 15:11:47 +00:00
parent d93998b17a
commit e8309efda5
9 changed files with 103 additions and 34 deletions

View File

@@ -521,7 +521,7 @@ _pinfo::commune_recv ()
unsigned int n;
cygheap_fdget cfd (fd);
if (cfd < 0)
n = strlen (strcpy (path, "<disconnected>")) + 1;
n = strlen (strcpy (path, "")) + 1;
else
n = strlen (cfd->get_proc_fd_name (path)) + 1;
if (!WriteFile (__tothem, &n, sizeof n, &nr, NULL))
@@ -756,7 +756,7 @@ _pinfo::fd (int fd, size_t &n)
{
cygheap_fdget cfd (fd);
if (cfd < 0)
s = strdup ("<disconnected>");
s = strdup ("");
else
s = cfd->get_proc_fd_name ((char *) malloc (CYG_MAX_PATH + 1));
n = strlen (s) + 1;