aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index e92e3d5a6f5..ac467840a25 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5812,6 +5812,21 @@ ns_term_shutdown (int sig)
5812#endif 5812#endif
5813 5813
5814#ifdef NS_IMPL_COCOA 5814#ifdef NS_IMPL_COCOA
5815 /* Some functions/methods in CoreFoundation/Foundation increase the
5816 maximum number of open files for the process in their first call.
5817 We make dummy calls to them and then reduce the resource limit
5818 here, since pselect cannot handle file descriptors that are
5819 greater than or equal to FD_SETSIZE. */
5820 CFSocketGetTypeID ();
5821 CFFileDescriptorGetTypeID ();
5822 [[NSFileHandle alloc] init];
5823 struct rlimit rlim;
5824 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
5825 && rlim.rlim_cur > FD_SETSIZE)
5826 {
5827 rlim.rlim_cur = FD_SETSIZE;
5828 setrlimit (RLIMIT_NOFILE, &rlim);
5829 }
5815 if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) { 5830 if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) {
5816 /* Set the app's activation policy to regular when we run outside 5831 /* Set the app's activation policy to regular when we run outside
5817 of a bundle. This is already done for us by Info.plist when we 5832 of a bundle. This is already done for us by Info.plist when we