On Tue, Dec 26, 2000 at 05:43:04PM -0800, Adam J. Richter wrote:
> I thought I should submit this patch for compiling autofs-4.0.0-pre9
> under glibc-2.2, in case nobody has done so already.
Actually, there's a better patch. It doesn't need to know OPEN_MAX at
all. My version has something like:
@@ -93,6 +92,7 @@
enum state { st_space, st_map, st_done } state;
int quoted = 0;
int ret;
+ int max_fd;
syslog(LOG_DEBUG, MODPREFIX "looking up %s", name);
@@ -139,11 +139,13 @@
FD_SET(pipefd[0],&ourfds);
FD_SET(epipefd[0],&ourfds);
+ max_fd = pipefd[0] > epipefd[0] ? pipefd[0] : epipefd[0];
+
files_left = 2;
while (files_left != 0) {
readfds = ourfds;
- if ( select(OPEN_MAX, &readfds, NULL, NULL, NULL) < 0 &&
+ if ( select(max_fd+1, &readfds, NULL, NULL, NULL) < 0 &&
errno != EINTR )
break;
> Also, I should mention that using the autofs4 module under
> linux-2.4.0-test13-pre4 causes my desktop machine to hang after
> about twenty minutes, although it was runing X every time the problem
I haven't seen any reports like this before. I wonder if test13 has
changed some of the vfs locking rules (again)...
Are the lockups related to mount/umount events, or do they just happen
spontaneously?
> As long as I'm sending this email, I should also mention the very
> minor inaccuracy that the the web page at http://www.goop.org/~jeremy/autofs/
> says that the latest user mode code is 4.0.0-pre8, but the latest release
> is 4.0.0-pre9.
Fixed.
Thanks,
J