From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] test: fix hang on FreeBSD Date: Mon, 21 May 2018 09:13:43 -0700 Message-ID: <20180521091343.237f2e96@xeon-e3> References: <1526902547-12710-1-git-send-email-radu.nicolau@intel.com> <5146448.Vdf9GQnNb8@xps> <8ed23c52-4b88-b40a-ccc5-31c6993654a1@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Thomas Monjalon , dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org To: Radu Nicolau Return-path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 3AEDC1B1F9 for ; Mon, 21 May 2018 18:13:47 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id w3-v6so6554681pgv.12 for ; Mon, 21 May 2018 09:13:47 -0700 (PDT) In-Reply-To: <8ed23c52-4b88-b40a-ccc5-31c6993654a1@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 21 May 2018 13:58:39 +0100 Radu Nicolau wrote: > On 5/21/2018 1:30 PM, Thomas Monjalon wrote: > > 21/05/2018 13:35, Radu Nicolau: > >> Fixes: af75078fece3 ("first public release") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Radu Nicolau > >> --- > >> @@ -34,7 +34,8 @@ test_panic(void) > >> printf("Fork Failed\n"); > >> return -1; > >> } > >> - wait(&status); > >> + sleep(1); > >> + waitpid(pid, &status, WNOHANG); > > Please give an explanation why you are adding this sleep. > > > To give a chance to the child process to complete before calling waitpid. Should not be necessary; waitpid does that.