From 5534bb3ad346ef4435e6fd0fe326771a4bde16a1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 13 May 2020 23:01:38 +0200 Subject: Properly handle interrupted write() call in ExtractTar With FileFd::Write we already have a helper for this situation we can just make use of here instead of hoping for the best or rolling our own solution here. --- apt-pkg/contrib/extracttar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/extracttar.cc b/apt-pkg/contrib/extracttar.cc index b22f59dbc..923c26d6c 100644 --- a/apt-pkg/contrib/extracttar.cc +++ b/apt-pkg/contrib/extracttar.cc @@ -276,7 +276,7 @@ bool ExtractTar::Go(pkgDirStream &Stream) { if (Fd > 0) { - if (write(Fd,Junk,Read) != (signed)Read) + if (not FileFd::Write(Fd, Junk, Read)) return Stream.Fail(Itm,Fd); } else -- cgit v1.2.3-18-g5258