From a5e471e55c82f23151f7751666cad7788300fa6d Mon Sep 17 00:00:00 2001 From: Brett Stottlemyer Date: Mon, 5 Nov 2018 05:41:48 -0500 Subject: Increase number of files allowed for macOS This addressed the following error: [29065] Critical: Error occurred while assembling the installer: Cannot open resource : Too many open files libc++abi.dylib: terminating with uncaught exception of type QInstaller::Error: std::exception Abort trap: 6 Kai from TQtC suggested the fix used in commit: 8f8800de7ab89e6cbc7b5eb08f2b3f16407e6cdf Applying it to binarycreator fixed the issue. Change-Id: I8e616ded94310d33824242ab52e1101b7f2ddafd Reviewed-by: Katja Marttila --- tools/binarycreator/binarycreator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/binarycreator/binarycreator.cpp') diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp index 1d2faeace..e5f00761c 100644 --- a/tools/binarycreator/binarycreator.cpp +++ b/tools/binarycreator/binarycreator.cpp @@ -754,6 +754,13 @@ static int printErrorAndUsageAndExit(const QString &err) int main(int argc, char **argv) { +// increase maximum numbers of file descriptors +#if defined (Q_OS_MACOS) + struct rlimit rl; + getrlimit(RLIMIT_NOFILE, &rl); + rl.rlim_cur = qMin(static_cast(OPEN_MAX), rl.rlim_max); + setrlimit(RLIMIT_NOFILE, &rl); +#endif QCoreApplication app(argc, argv); QInstaller::init(); -- cgit v1.2.3