From 2ec479b762d68f1eef16e009bcf3bb1b78601f97 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Wed, 15 Oct 2014 15:08:54 -0400 Subject: [PATCH] [io-layer] Fix the linux build. --- mono/io-layer/handles.c | 59 ----------------------------------------- 1 file changed, 59 deletions(-) diff --git a/mono/io-layer/handles.c b/mono/io-layer/handles.c index 6644f568d59..4e8c5223c75 100644 --- a/mono/io-layer/handles.c +++ b/mono/io-layer/handles.c @@ -1842,65 +1842,6 @@ void _wapi_handle_check_share (struct _WapiFileShare *share_info, int fd) } } - for (i = 0; i < _WAPI_HANDLE_INITIAL_COUNT; i++) { - struct _WapiHandleShared *shared; - struct _WapiHandle_process *process_handle; - - shared = &_wapi_shared_layout->handles[i]; - - if (shared->type == WAPI_HANDLE_PROCESS) { - DIR *fd_dir; - struct dirent *fd_entry; - char subdir[_POSIX_PATH_MAX]; - - process_handle = &shared->u.process; - pid = process_handle->id; - - /* Look in /proc//fd/ but ignore - * /proc//fd/, as we have the - * file open too - */ - g_snprintf (subdir, _POSIX_PATH_MAX, "/proc/%d/fd", - pid); - - fd_dir = opendir (subdir); - if (fd_dir == NULL) { - continue; - } - - DEBUG ("%s: Looking in %s", __func__, subdir); - - proc_fds = TRUE; - - while ((fd_entry = readdir (fd_dir)) != NULL) { - char path[_POSIX_PATH_MAX]; - struct stat link_stat; - - if (!strcmp (fd_entry->d_name, ".") || - !strcmp (fd_entry->d_name, "..") || - (pid == self && - fd == atoi (fd_entry->d_name))) { - continue; - } - - g_snprintf (path, _POSIX_PATH_MAX, - "/proc/%d/fd/%s", pid, - fd_entry->d_name); - - stat (path, &link_stat); - if (link_stat.st_dev == share_info->device && - link_stat.st_ino == share_info->inode) { - DEBUG ("%s: Found it at %s", - __func__, path); - - found = TRUE; - } - } - - closedir (fd_dir); - } - } - if (proc_fds == FALSE) { _wapi_handle_check_share_by_pid (share_info); } else if (found == FALSE) { -- 2.25.1