18562261ab
Caught while investigating timeouts on a ARM64 server. Stracing a test process running the eal_flags_autotest, we can see that the fork helper is checking all possible file descriptors from getdtablesize() to 2, and close the existing ones. We can do better by inspecting this forked process /proc/self/fd directory. Besides, checking file descriptors via /proc/self/fd only makes sense for Linux. This code was a noop on FreeBSD. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Krzysztof Kanas <kkanas@marvell.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Krzysztof Kanas <kkanas@marvell.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>