Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the file descriptor cleanup on OSX #1366

Merged
merged 1 commit into from
May 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mca/odls/alps/odls_alps_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2008 The University of Tennessee and The University
* Copyright (c) 2004-2022 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
Expand Down Expand Up @@ -286,7 +286,11 @@ static int close_open_file_descriptors(int write_fd, prte_iof_base_io_conf_t opt
struct dirent *files;
int app_alps_filedes[2], alps_app_filedes[2];

#if defined(__OSX__)
dir = opendir("/dev/fd");
#else /* Linux */
dir = opendir("/proc/self/fd");
#endif /* defined(__OSX__) */
if (NULL == dir) {
return PRTE_ERR_FILE_OPEN_FAILURE;
}
Expand Down