From owner-svn-src-head@FreeBSD.ORG Sun Sep 19 08:01:51 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 DD906106564A; Sun, 19 Sep 2010 08:01:51 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 66CE58FC14; Sun, 19 Sep 2010 08:01:51 +0000 (UTC) Received: by qyk4 with SMTP id 4so3941293qyk.13 for ; Sun, 19 Sep 2010 01:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t/yyu4+4RjUbaZP6G0w61Iplr8QG9BDutPYUgM15u1U=; b=xO+TdIwWWfpU1sK0bHb3EJgLWsmsJNZjpdlnHb+pgT8WtJMx5UZfgAzR5FSMx+eJFO vcuOX54NExh1vfB5FAtlI7dVD4ijwZOMnck0NgXgn9FPCcKfWxBL2KF6FwSFJkyfo5eV 33qkzOaxmvqlxiENr0G7QFIxiiR9zj+tBLvxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Dsc0ritLD+GytiNESfaEVTDO0MU631GmLfyjxrAF7geGn2IloUAXj9Ja57Wt1X6ew0 eWHxLvTbaQYgocVsvCKso7Su4Bfge1mPsilKn+uFc8MrVcDXRsNQBwMgtYnt13NfzQ5F uca+S+UyY7GT9/R29OYoBIDa5wh0Bjebe5VeA= MIME-Version: 1.0 Received: by 10.229.95.73 with SMTP id c9mr5122902qcn.111.1284883310400; Sun, 19 Sep 2010 01:01:50 -0700 (PDT) Received: by 10.229.19.206 with HTTP; Sun, 19 Sep 2010 01:01:50 -0700 (PDT) In-Reply-To: <201009182338.o8INcLF8081790@svn.freebsd.org> References: <201009182338.o8INcLF8081790@svn.freebsd.org> Date: Sun, 19 Sep 2010 12:01:50 +0400 Message-ID: From: pluknet To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 08:01:52 -0000 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 > > Log: > =A0Ignore EINTR when calling waitpid. > > Modified: > =A0head/lib/libproc/proc_util.c > > 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 =A0 =A0 =A0 =A0Sat Sep 18 22:37:47 2010 = =A0 =A0 =A0 =A0(r212830) > +++ head/lib/libproc/proc_util.c =A0 =A0 =A0 =A0Sat Sep 18 23:38:21 2010 = =A0 =A0 =A0 =A0(r212831) > @@ -145,7 +145,8 @@ proc_wstatus(struct proc_handle *phdl) > =A0 =A0 =A0 =A0if (phdl =3D=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (-1); > =A0 =A0 =A0 =A0if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 warn("waitpid"); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (errno !=3D EINTR) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 warn("waitpid"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (-1); > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0if (WIFSTOPPED(status)) Hi. 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: while (waitpid(...) < 0) if (errno !=3D EINTR) { warn("waitpid"); return (-1); } --=20 wbr, pluknet