Re: [PATCH] pgrep: make --terminal respect other criteria

"Craig Small" <[email protected]> ("csmall") Wed, 25 Jan 2023 20:38:34 +1100
Newsgroups gmane.linux.procps.devel
Message-ID <CALy8Cw4N18qiCmppKv0FzDyZ5hhjkM62H3RtDEc8bHvLKHxUHw@mail.gmail.com>
--000000000000217a9205f3136631
Content-Type: text/plain; charset="UTF-8"

On Sat, 10 Dec 2022 at 05:33, Jason Cox <[email protected]> wrote:

> I discovered today that in some cases the --terminal option to pgrep
> will cause all processes matching the terminal to be output, even if
> other criteria would exclude them. Specifically, I noticed that it
> overrides the --runstates option. This simple patch fixes it for me.
>
Hi Jason,
  Thanks for the patch, it is applied at
https://gitlab.com/procps-ng/procps/-/commit/848be2b1e23d4db4420dcfc15d3166073e813f4e
I also created a simple test for the issue you mentioned.

 - Craig

--000000000000217a9205f3136631
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Sat, 10 Dec 2022 at 05:33, Jason Cox &=
lt;<a href=3D"mailto:[email protected]">[email protected]=
rg</a>&gt; wrote:<br></div><div class=3D"gmail_quote"><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">I discovered today that in some cases the --te=
rminal option to pgrep<br>
will cause all processes matching the terminal to be output, even if<br>
other criteria would exclude them. Specifically, I noticed that it<br>
overrides the --runstates option. This simple patch fixes it for me.<br></b=
lockquote><div>Hi Jason,</div><div>=C2=A0 Thanks for the patch, it is appli=
ed at <a href=3D"https://gitlab.com/procps-ng/procps/-/commit/848be2b1e23d4=
db4420dcfc15d3166073e813f4e">https://gitlab.com/procps-ng/procps/-/commit/8=
48be2b1e23d4db4420dcfc15d3166073e813f4e</a></div><div>I also created a simp=
le test for the issue you mentioned.<br></div><div><br></div><div>=C2=A0- C=
raig</div><br></div></div>

--000000000000217a9205f3136631--