Quoting David Bremner (2026-01-25 01:27:46) > Anton Khirnov <[email protected]> writes: > > > +void > > +closefrom (int lowfd) > > +{ > > + for (int i = lowfd; i < 1024; i++) > > + close (i); > > +} > > Maybe I'm revealing my ignorance, but I feel like the magic number 1024 > deserves an explanation?
It's the maximum FD value accepted by select(), and for that reason it is also the traditional upper bound on open file descriptors (ulimit -n). I'll add a comment to this effect to the code. -- Anton Khirnov _______________________________________________ notmuch mailing list -- [email protected] To unsubscribe send an email to [email protected]
