<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/contrib/fileutl.cc, branch 3.3.0</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=3.3.0</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=3.3.0'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2026-04-08T10:41:43Z</updated>
<entry>
<title>apt: modernize to make_unique C++17</title>
<updated>2026-04-08T10:41:43Z</updated>
<author>
<name>Herman Semenoff</name>
<email>GermanAizek@yandex.ru</email>
</author>
<published>2026-04-08T09:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=23dba65f031954df896bc3c6dfb1a9705574886b'/>
<id>urn:sha1:23dba65f031954df896bc3c6dfb1a9705574886b</id>
<content type='text'>
References:
- https://stackoverflow.com/questions/79700634/pros-and-cons-of-make-unique-vs-direct-constructor-call-in-c17
- https://towardsdev.com/why-std-make-unique-beats-new-in-modern-c-7e2ba653737e
- https://www.sololearn.com/en/Discuss/3334779/where-make_unique-is-better-than-unique_ptrraw-pointer
</content>
</entry>
<entry>
<title>apt: push to emplace C++11 if possible</title>
<updated>2026-04-08T10:40:55Z</updated>
<author>
<name>Herman Semenoff</name>
<email>GermanAizek@yandex.ru</email>
</author>
<published>2026-04-08T08:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ef70431f02e2ec13ecedab7ac342574e52d1877b'/>
<id>urn:sha1:ef70431f02e2ec13ecedab7ac342574e52d1877b</id>
<content type='text'>
References:
- https://www.reddit.com/r/cpp_questions/comments/pm63yx/why_clangtidy_says_use_emplace_back_instead_of/
- https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html
</content>
</entry>
<entry>
<title>Correctly append or remove FD_CLOEXEC</title>
<updated>2025-10-20T18:26:49Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-10-20T18:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=bb1e6834e8a1cd6fd5b88b5a1962e9d813a080fc'/>
<id>urn:sha1:bb1e6834e8a1cd6fd5b88b5a1962e9d813a080fc</id>
<content type='text'>
Rather than just setting the flags to 0 or FD_CLOEXEC, read
the current value and append or remove as needed.
</content>
</entry>
<entry>
<title>ExecFork: Simplify closing and make it safe</title>
<updated>2025-10-20T18:06:50Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-10-20T18:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3dea3434bf2003b757d7ecdb5a8194c8a0c7023f'/>
<id>urn:sha1:3dea3434bf2003b757d7ecdb5a8194c8a0c7023f</id>
<content type='text'>
Implement a wrapper around FD_CLOEXEC and use it in place of
the raw fcntl(). This wrapper _Exit()s the child if the operation
failed.

Restructure the close_range() handling to simply mark all fds for
closing first and then "reopen" the ones we should keep.
</content>
</entry>
<entry>
<title>Add some comments and tests around Keep-Fd ordering</title>
<updated>2025-10-20T17:42:57Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-10-20T17:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cb8df17ff8e59192ae2ab864006eea120d408a7a'/>
<id>urn:sha1:cb8df17ff8e59192ae2ab864006eea120d408a7a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ExecFork: Use close_range() if available</title>
<updated>2025-10-20T15:16:45Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-10-20T15:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6aca3716f051b5b6bff63d51fff68b9c7ebc7474'/>
<id>urn:sha1:6aca3716f051b5b6bff63d51fff68b9c7ebc7474</id>
<content type='text'>
Use close_range() if we have it in preference to iterating
over /proc/self/fd and falling back to closing all possible
fds.

This builds sets of ranges to close that take into account
the APT::Keep-Fds vector, and a test case is provided to
ensure correctness of the splitting logic.

Preference is given to close_range() over /proc as in the
optimal case, this results in a single system call!
</content>
</entry>
<entry>
<title>Fix error handling with getline</title>
<updated>2025-05-19T15:58:13Z</updated>
<author>
<name>Walter Lozano</name>
<email>walter.lozano@collabora.com</email>
</author>
<published>2022-10-14T12:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=91e8c456964d5ff4b3b7afe2f1cb074de9dfe592'/>
<id>urn:sha1:91e8c456964d5ff4b3b7afe2f1cb074de9dfe592</id>
<content type='text'>
The function getline is used to read data from different streams, however,
the error handling is not accurate.

From the man page, getline returns -1 on failure and sets errno accordingly,
but the current implementation only checks errno to see if there was a
failure. With this approach, in case getline returns success but also sets
errno it is consider and error.

Fix the issue but also checking the return value of getline.

Signed-off-by: Walter Lozano &lt;walter.lozano@collabora.com&gt;
</content>
</entry>
<entry>
<title>fileutl: Convert FileFd::d to std::unique_ptr</title>
<updated>2025-02-15T08:51:55Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-15T08:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cb7822179bd21abd079664a0af02f8ea6559c788'/>
<id>urn:sha1:cb7822179bd21abd079664a0af02f8ea6559c788</id>
<content type='text'>
</content>
</entry>
<entry>
<title>StartsWithGPGClearTextSignature(): don't keep un-written-to pointer to constant string in .data</title>
<updated>2025-02-14T18:45:12Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2025-01-23T22:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dcb2126aee2d54d1ac0f2d11133a93fa01851fcb'/>
<id>urn:sha1:dcb2126aee2d54d1ac0f2d11133a93fa01851fcb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>flAbsPath(): try to re-use storage of argument</title>
<updated>2025-02-14T18:45:12Z</updated>
<author>
<name>наб</name>
<email>nabijaczleweli@nabijaczleweli.xyz</email>
</author>
<published>2025-01-23T22:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e9461c19db6d6c353b6a5355ead8dda2e9045229'/>
<id>urn:sha1:e9461c19db6d6c353b6a5355ead8dda2e9045229</id>
<content type='text'>
</content>
</entry>
</feed>
