Hello,

I made a patch that fixes (at least to me) the declaration of an unused variable if HAVE_GETRLIMIT is false. The OS I use does not have getrlimit().

Is sysconf(3) mandatory? Because it is not guarded (HAVE_SYSCONF ?). It is a few lines below where my patch applies.

And a quick question: Can this whole thing work without fork(2)? I have implemented posix_spawn(3) in GNU make (to replace forks) with success, however I'm still waiting for the patch to be applied.

Aron

--- lib/fdleak.c.orig	2015-12-28 22:10:23.000000000 +0100
+++ lib/fdleak.c	2018-07-16 10:44:36.768831174 +0200
@@ -108,7 +108,9 @@
 static int
 get_max_fd (void)
 {
+#if defined HAVE_GETRLIMIT && defined RLIMIT_NOFILE
   struct rlimit fd_limit;
+#endif
   long open_max;
 
   open_max = get_proc_max_fd ();

Reply via email to