Running 8 building 10 gives "Out of file descriptors" ?

Dieter BSD dieterbsd at gmail.com
Wed Nov 19 07:38:38 UTC 2014


> Oh.  Hrm.  The only thing in the source that says that exact message is
> in /bin/sh input.c, and it looks like this:
>
>                fd2 = fcntl(fd, F_DUPFD_CLOEXEC, 10);
>                close(fd);
>                if (fd2 < 0)
>                        error("Out of file descriptors");
>
> So you have guess what the actual error is, or hack the code to print
> errno or something.

THANK YOU!

I had cp-ed bash into the chroot, so... changed my toy mkdep to
bash and it worked fine.  Then a couple lines later make tried to
run sh again and sh drops the ball again.  OK, so I made /bin/sh
a symlink to /bin/bash and it is grinding away.  Over an hour now,
and the logfile is 3.6 MB and counting.  With sh it failed in about
10 seconds.

That code should print the name of the program complaining,
and yes, should print errno.  I suppose I ought to do that and find
out why fcntl is failing.


More information about the freebsd-hackers mailing list