diff options
author | Brett Stottlemyer <bstottle@ford.com> | 2018-11-05 05:41:48 -0500 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-11-07 07:17:40 +0000 |
commit | a5e471e55c82f23151f7751666cad7788300fa6d (patch) | |
tree | d90c3c42c46446ee763601e1fe3c3e8efaecedb3 | |
parent | 6325832551eb332dc02aba2570a0e394dcdd8549 (diff) |
Increase number of files allowed for macOS
This addressed the following error:
[29065] Critical: Error occurred while assembling the installer: Cannot
open resource <some file>: 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 <katja.marttila@qt.io>
-rw-r--r-- | tools/binarycreator/binarycreator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<rlim_t>(OPEN_MAX), rl.rlim_max); + setrlimit(RLIMIT_NOFILE, &rl); +#endif QCoreApplication app(argc, argv); QInstaller::init(); |