Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
libpkg: Use line buffering for the metalog file handle
Mark Johnston committed 7 months ago
commit 7ea9566835a82f111d7771f58168babc5e0dde6a
parent 3530a070b2ec0e4ed3857fe632ed1cd3493b7d26
1 file changed +4 -4
modified libpkg/metalog.c
@@ -37,11 +37,11 @@ int
metalog_open(const char *metalog)
{
	metalogfp = fopen(metalog, "ae");
-
	if (metalogfp == NULL) {
+
	if (metalogfp == NULL)
		pkg_fatal_errno("Unable to open metalog '%s'", metalog);
-
	} 
-

-
	return EPKG_OK;
+
	/* Package install scripts may add entries, so avoid interleaving. */
+
	setvbuf(metalogfp, NULL, _IOLBF, 0);
+
	return (EPKG_OK);
}

int