From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0252C4338F for ; Mon, 26 Jul 2021 12:17:17 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 83A8F60F44 for ; Mon, 26 Jul 2021 12:17:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 83A8F60F44 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nutanix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93550410E1; Mon, 26 Jul 2021 14:17:16 +0200 (CEST) Received: from sent.movementarian.org (unknown [88.98.93.30]) by mails.dpdk.org (Postfix) with ESMTP id 698B640DDA for ; Mon, 26 Jul 2021 14:17:15 +0200 (CEST) Received: from jlevon by sent.movementarian.org with local (Exim 4.93) (envelope-from ) id 1m7zXm-009koa-0d; Mon, 26 Jul 2021 13:17:14 +0100 From: John Levon To: dev@dpdk.org Cc: kkanas@marvell.com, John Levon Date: Mon, 26 Jul 2021 13:17:08 +0100 Message-Id: <20210726121708.2324809-1-john.levon@nutanix.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] app/test: quieten noise while forking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When closing file descriptors post-fork, ignore "." and ".." directory entries. Signed-off-by: John Levon --- app/test/process.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test/process.h b/app/test/process.h index 0ed91a939e..5b10cf64df 100644 --- a/app/test/process.h +++ b/app/test/process.h @@ -90,6 +90,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value) } while ((dirent = readdir(dir)) != NULL) { + + if (strcmp(dirent->d_name, ".") == 0 || + strcmp(dirent->d_name, "..") == 0) + continue; + errno = 0; fd = strtol(dirent->d_name, &endptr, 10); if (errno != 0 || endptr[0] != '\0') { -- 2.25.1