From owner-svn-src-head@FreeBSD.ORG Sun Sep 19 09:47:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 157A0106566C; Sun, 19 Sep 2010 09:47:21 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id E08998FC1B; Sun, 19 Sep 2010 09:47:20 +0000 (UTC) Received: from d.earth.lavabit.com (d.earth.lavabit.com [192.168.111.13]) by karen.lavabit.com (Postfix) with ESMTP id CB82E11B851; Sun, 19 Sep 2010 04:47:19 -0500 (CDT) Received: from 10.0.10.3 (221.163.108.93.rev.vodafone.pt [93.108.163.221]) by lavabit.com with ESMTP id 41VM947P2XGD; Sun, 19 Sep 2010 04:47:19 -0500 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: Date: Sun, 19 Sep 2010 10:47:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201009182338.o8INcLF8081790@svn.freebsd.org> To: pluknet X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212831 - head/lib/libproc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 09:47:21 -0000 On 19 Sep 2010, at 09:01, pluknet wrote: > On 19 September 2010 03:38, Rui Paulo wrote: >> Author: rpaulo >> Date: Sat Sep 18 23:38:21 2010 >> New Revision: 212831 >> URL: http://svn.freebsd.org/changeset/base/212831 >>=20 >> Log: >> Ignore EINTR when calling waitpid. >>=20 >> Modified: >> head/lib/libproc/proc_util.c >>=20 >> Modified: head/lib/libproc/proc_util.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libproc/proc_util.c Sat Sep 18 22:37:47 2010 = (r212830) >> +++ head/lib/libproc/proc_util.c Sat Sep 18 23:38:21 2010 = (r212831) >> @@ -145,7 +145,8 @@ proc_wstatus(struct proc_handle *phdl) >> if (phdl =3D=3D NULL) >> return (-1); >> if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { >> - warn("waitpid"); >> + if (errno !=3D EINTR) >> + warn("waitpid"); >> return (-1); >> } >> if (WIFSTOPPED(status)) >=20 > Hi. >=20 > After this change the waitpid() error handling still doesn't > ignore EINTR (well, only warn() ignores EINTR now), > but it rather returns with -1. Is it intentional? > I though something more like this was meant in svn log: >=20 > while (waitpid(...) < 0) > if (errno !=3D EINTR) { > warn("waitpid"); > return (-1); > } Maybe the log was badly worded, but the code is right. Regards, -- Rui Paulo