failtest: don't assume FD_SETSIZE is maximum runtime fd.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 8 Mar 2012 03:44:22 +0000 (14:14 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 8 Mar 2012 05:30:48 +0000 (06:30 +0100)
commitb442e375256d93637b38f997a78e330ba4774c43
treeb7cde6a93748b146c98410edcb5ac4c35ffffd70
parent256e2df9dc147b6d98afb4fa2ccdf5f65eaef30c
failtest: don't assume FD_SETSIZE is maximum runtime fd.

This breaks when rlimit is less.  Unfortunately, valgrind (32 bit x86,
3.7.0.SVN, Ubuntu) fails to set the file limit properly on the test:
reducing it to the obvious getrlimit/setrlimit/getrlimit works fine,
so leaving diagnostics for another day.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit a85a809bb17af6b6cf6fa31b300c6622f64ee700)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar  8 06:30:48 CET 2012 on sn-devel-104
lib/ccan/failtest/_info
lib/ccan/failtest/failtest.c
lib/ccan/failtest/test/run-with-fdlimit.c [new file with mode: 0644]