Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Muttley@DastardlyHQ.org Newsgroups: comp.lang.c Subject: Re: Python recompile Date: Wed, 12 Mar 2025 08:11:45 -0000 (UTC) Organization: A noiseless patient Spider Lines: 38 Message-ID: References: <20250304092827.708@kylheku.com> <871pv861ht.fsf@nosuchdomain.example.com> <20250308192940.00001351@yahoo.com> <20250309012626.00001276@yahoo.com> <20250309112807.0000489d@yahoo.com> <20250310152000.00004955@yahoo.com> Injection-Date: Wed, 12 Mar 2025 09:11:46 +0100 (CET) Injection-Info: dont-email.me; posting-host="dad2c687b964bd996f7e93d44f6261e5"; logging-data="2648844"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189THBlhU9I9Evwuw35AFuo" Cancel-Lock: sha1:vKYvx+osWgYqweTFB2cr6iFMtQ4= On Tue, 11 Mar 2025 20:52:19 -0000 (UTC) Lawrence D'Oliveiro wibbled: >On Tue, 11 Mar 2025 08:34:43 -0000 (UTC), Muttley wrote: > >> On Mon, 10 Mar 2025 21:38:35 -0000 (UTC) >> Lawrence D'Oliveiro wrote: >>> >>>the numbers of those FDs lie beyond the upper limit of the array, you’re >>>stuffed. >> >> Any descriptor created that had a value greater than select() could cope >> with would break a lot of old code so although I have no proof, I'd bet >> money on the kernel/libc authors taking this into account when >> allocating user space descriptor values. > >You really want to bet money? From >: > > BUGS > > POSIX allows an implementation to define an upper limit, > advertised via the constant FD_SETSIZE, on the range of file > descriptors that can be specified in a file descriptor set. The > Linux kernel imposes no fixed limit, but the glibc implementation > makes fd_set a fixed-size type, with FD_SETSIZE defined as 1024, > and the FD_*() macros operating according to that limit. > >Default settings on my current system: > > ldo@theon:~> prlimit -n > RESOURCE DESCRIPTION SOFT HARD UNITS > NOFILE max number of open files 1024 524288 files > >How much are you going to pay? Nothing, because who knows what libc will do if the descriptor exceeds that soft limit. It may try again to get a lower value.