summarylogtreecommitdiffstats
path: root/0002-Remove-getdtablesize.patch
diff options
context:
space:
mode:
Diffstat (limited to '0002-Remove-getdtablesize.patch')
-rw-r--r--0002-Remove-getdtablesize.patch98
1 files changed, 0 insertions, 98 deletions
diff --git a/0002-Remove-getdtablesize.patch b/0002-Remove-getdtablesize.patch
deleted file mode 100644
index 019ebfb205cb..000000000000
--- a/0002-Remove-getdtablesize.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- a/orte/mca/state/base/state_base_fns.c
-+++ b/orte/mca/state/base/state_base_fns.c
-@@ -1068,95 +1068,4 @@
-
- void orte_state_base_check_fds(orte_job_t *jdata)
- {
-- int nfds, i, fdflags, flflags;
-- char path[1024], info[256], **list=NULL, *status, *result, *r2;
-- ssize_t rc;
-- struct flock fl;
-- bool flk;
-- int cnt = 0;
--
-- /* get the number of available file descriptors
-- * for this daemon */
-- nfds = getdtablesize();
-- result = NULL;
-- /* loop over them and get their info */
-- for (i=0; i < nfds; i++) {
-- fdflags = fcntl(i, F_GETFD);
-- if (-1 == fdflags) {
-- /* no open fd in that slot */
-- continue;
-- }
-- flflags = fcntl(i, F_GETFL);
-- if (-1 == flflags) {
-- /* no open fd in that slot */
-- continue;
-- }
-- snprintf(path, 1024, "/proc/self/fd/%d", i);
-- memset(info, 0, 256);
-- /* read the info about this fd */
-- rc = readlink(path, info, 256);
-- if (-1 == rc) {
-- /* this fd is unavailable */
-- continue;
-- }
-- /* get any file locking status */
-- fl.l_type = F_WRLCK;
-- fl.l_whence = 0;
-- fl.l_start = 0;
-- fl.l_len = 0;
-- if (-1 == fcntl(i, F_GETLK, &fl)) {
-- flk = false;
-- } else {
-- flk = true;
-- }
-- /* construct the list of capabilities */
-- if (fdflags & FD_CLOEXEC) {
-- opal_argv_append_nosize(&list, "cloexec");
-- }
-- if (flflags & O_APPEND) {
-- opal_argv_append_nosize(&list, "append");
-- }
-- if (flflags & O_NONBLOCK) {
-- opal_argv_append_nosize(&list, "nonblock");
-- }
-- /* from the man page:
-- * Unlike the other values that can be specified in flags,
-- * the access mode values O_RDONLY, O_WRONLY, and O_RDWR,
-- * do not specify individual bits. Rather, they define
-- * the low order two bits of flags, and defined respectively
-- * as 0, 1, and 2. */
-- if (O_RDONLY == (flflags & 3)) {
-- opal_argv_append_nosize(&list, "rdonly");
-- } else if (O_WRONLY == (flflags & 3)) {
-- opal_argv_append_nosize(&list, "wronly");
-- } else {
-- opal_argv_append_nosize(&list, "rdwr");
-- }
-- if (flk && F_UNLCK != fl.l_type) {
-- if (F_WRLCK == fl.l_type) {
-- opal_argv_append_nosize(&list, "wrlock");
-- } else {
-- opal_argv_append_nosize(&list, "rdlock");
-- }
-- }
-- if (NULL != list) {
-- status = opal_argv_join(list, ' ');
-- opal_argv_free(list);
-- list = NULL;
-- if (NULL == result) {
-- asprintf(&result, " %d\t(%s)\t%s\n", i, info, status);
-- } else {
-- asprintf(&r2, "%s %d\t(%s)\t%s\n", result, i, info, status);
-- free(result);
-- result = r2;
-- }
-- free(status);
-- }
-- ++cnt;
-- }
-- asprintf(&r2, "%s: %d open file descriptors after job %d completed\n%s",
-- ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), cnt, ORTE_LOCAL_JOBID(jdata->jobid), result);
-- opal_output(0, "%s", r2);
-- free(result);
-- free(r2);
- }