nstool loops on accept(), but failed to close the accepted socket fds before continuing on. So, with repeated commands it would eventually die with an EMFILE. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- test/nstool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/nstool.c b/test/nstool.c index bca9569..1bdf44e 100644 --- a/test/nstool.c +++ b/test/nstool.c @@ -201,6 +201,8 @@ static void cmd_hold(int argc, char *argv[]) rc = read(afd, &buf, sizeof(buf)); if (rc < 0) die("read(): %s\n", strerror(errno)); + + close(afd); } while (rc == 0); unlink(sockpath); -- 2.40.1