Date: Tue, 8 Sep 2015 14:41:55 -0700 From: Karl Young <karly@kipshouse.org> To: freebsd-questions@freebsd.org Subject: Alternatives to popen()? Message-ID: <20150908214155.GA11226@mailboy.kipshouse.net>
next in thread | raw e-mail | index | archive | help
We've run into ths bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=148581 [libc] fopen(3) fails with EMFILE if there are more than SHORT_MAX fds open Since popen returns FILE* it hits the same issue. The program we use will typically have many thousands of sockets open, and if it happens to have over 32K open when we call popen it fails. So I guess we can cobble together our own popen with fork and pipe. Are there any other alternatives? Thanks -karl
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150908214155.GA11226>