Date: Sat, 28 Mar 2026 09:44:22 +0100 From: Baptiste Daroussin <bapt@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 33424fd50ee0 - main - diff3: plug fd leak Message-ID: <aceUu7I1V6CSP-q4@b.nours.eu> In-Reply-To: <accjcqXwTPrXMsm1@kib.kiev.ua> References: <69c4e316.1c06a.68bddc8@gitrepo.freebsd.org> <accjcqXwTPrXMsm1@kib.kiev.ua>
index | next in thread | previous in thread | raw e-mail
On Sat 28 Mar 02:40, Konstantin Belousov wrote: > On Thu, Mar 26, 2026 at 07:41:10AM +0000, Baptiste Daroussin wrote: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=33424fd50ee0333bc6f70b5b14a270b85e5b5de1 > > > > commit 33424fd50ee0333bc6f70b5b14a270b85e5b5de1 > > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > AuthorDate: 2026-03-26 07:40:29 +0000 > > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > CommitDate: 2026-03-26 07:40:29 +0000 > > > > diff3: plug fd leak > > > > MFC After: 1 week > > Reported by: kib > > --- > > usr.bin/diff3/diff3.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c > > index 75e8c6297855..8212b51e15a2 100644 > > --- a/usr.bin/diff3/diff3.c > > +++ b/usr.bin/diff3/diff3.c > > @@ -947,6 +947,7 @@ wait_and_check(int pd) > > if (errno != EINTR) > > err(2, "pdwait"); > > } > > + close(pd); > > > > if (WIFEXITED(status) && WEXITSTATUS(status) >= 2) > > errx(2, "diff exited abnormally"); > > Well, I pointed out something different. I think that pipes filedescriptors > leak to children. Oh I see you, then I guess this should cover it: https://reviews.freebsd.org/D56120 Best regards, Bapthome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aceUu7I1V6CSP-q4>
