Dan Albert
2014-Jun-14 01:30 UTC
[LLVMdev] [PATCH] Swap getdtablesize() for sysconf(_SC_OPEN_MAX).
Bionic would like to remove getdtablesize(3), as it was removed from POSIX 2004. Change-Id: Ie41018d531188796ac7f9496917705883ce3923e --- lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc index ca47e3c..ddb9e17 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -255,7 +255,7 @@ class SymbolizerProcess : public ExternalSymbolizerInterface { internal_close(outfd[1]); internal_close(infd[0]); internal_close(infd[1]); - for (int fd = getdtablesize(); fd > 2; fd--) + for (int fd = sysconf(_SC_OPEN_MAX); fd > 2; fd--) internal_close(fd); ExecuteWithDefaultArgs(path_); internal__exit(1); -- 2.0.0.526.g5318336
Evgeniy Stepanov
2014-Jun-16 08:26 UTC
[LLVMdev] [PATCH] Swap getdtablesize() for sysconf(_SC_OPEN_MAX).
LGTM On Sat, Jun 14, 2014 at 5:30 AM, Dan Albert <danalbert at google.com> wrote:> Bionic would like to remove getdtablesize(3), as it was removed from POSIX 2004. > > Change-Id: Ie41018d531188796ac7f9496917705883ce3923e > --- > lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc > index ca47e3c..ddb9e17 100644 > --- a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc > +++ b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc > @@ -255,7 +255,7 @@ class SymbolizerProcess : public ExternalSymbolizerInterface { > internal_close(outfd[1]); > internal_close(infd[0]); > internal_close(infd[1]); > - for (int fd = getdtablesize(); fd > 2; fd--) > + for (int fd = sysconf(_SC_OPEN_MAX); fd > 2; fd--) > internal_close(fd); > ExecuteWithDefaultArgs(path_); > internal__exit(1); > -- > 2.0.0.526.g5318336 > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev