Date: Sun, 19 Sep 2010 12:01:50 +0400 From: pluknet <pluknet@gmail.com> To: Rui Paulo <rpaulo@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212831 - head/lib/libproc Message-ID: <AANLkTikWYQGY%2By4nyXePG1mcPG578k3SK-mZJd4cebSQ@mail.gmail.com> In-Reply-To: <201009182338.o8INcLF8081790@svn.freebsd.org> References: <201009182338.o8INcLF8081790@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19 September 2010 03:38, Rui Paulo <rpaulo@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikWYQGY%2By4nyXePG1mcPG578k3SK-mZJd4cebSQ>