diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2026-07-05 18:22:31 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2026-07-05 18:22:31 +0000 |
| commit | e988c5eab5231646c612d35ff5b16122cebfbf6a (patch) | |
| tree | 307239878c1f97050623742f4663c68476e81e4f /filemon/filemon_dev.c | |
| parent | ef402bba84260816d3e8d6e2439b0bc7eddc9446 (diff) | |
Import bmake-20260704vendor/NetBSD/bmake/20260704vendor/NetBSD/bmake
Intersting/relevant changes since bmake-20260508
ChangeLog since bmake-20260508
2026-07-04 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20260704
2026-07-03 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20260703
Merge with NetBSD make, pick up
o meta.c: do a better job of resolving relative paths
o var.c: add alternation support to :M
eg. :M*{Makefile*,.mk} matches any *Makefile* or *.mk
2026-07-02 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20260702
Merge with NetBSD make, pick up
o meta.c: .MAKE.META.FILTER can be used to more generally filter
relevant content of .meta file in meta_oodate.
2026-06-19 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20260619
Merge with NetBSD make, pick up
o make.1: fix description of .MADE it is a source not a target.
* update mk files
2026-06-10 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20260609
Merge with NetBSD make, pick up
o parse.c: allow semicolons and parentheses in dependency line
expressions
mk/ChangeLog since bmake-20260508
2026-07-04 Simon J Gerraty <sjg@beast.crufty.net>
* install-mk (MK_VERSION): 20260704
2026-07-03 Simon J Gerraty <sjg@beast.crufty.net>
* dirdeps.mk: make use of alternation support in latest bmake
when setting .MAKE.META.IGNORE_FILTER so we can get both
Makefile.depend* and *.mk to make cache out-of-date.
2026-07-02 Simon J Gerraty <sjg@beast.crufty.net>
* meta2deps.py: detect corrupted filemon data on Linux,
caused by lost newlines.
2026-06-21 Simon J Gerraty <sjg@beast.crufty.net>
* install-mk (MK_VERSION): 20260621
* gendirdeps.mk: more debug output
* meta.autodep.mk: remove extra } from GENDIRDEPS_ENV
2026-06-19 Simon J Gerraty <sjg@beast.crufty.net>
* install-mk (MK_VERSION): 20260619
* install-new.mk: for POSIX_SHELL we need .new*
rather than just .new
2026-05-21 Simon J Gerraty <sjg@beast.crufty.net>
* meta2deps.{py,sh}: skip pathnames with spaces - not worth the pain.
Diffstat (limited to 'filemon/filemon_dev.c')
| -rw-r--r-- | filemon/filemon_dev.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/filemon/filemon_dev.c b/filemon/filemon_dev.c index 741edc7c25ea..f605061f5c67 100644 --- a/filemon/filemon_dev.c +++ b/filemon/filemon_dev.c @@ -1,4 +1,4 @@ -/* $NetBSD: filemon_dev.c,v 1.9 2022/03/04 23:17:16 sjg Exp $ */ +/* $NetBSD: filemon_dev.c,v 1.10 2026/07/03 03:34:25 sjg Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -123,6 +123,19 @@ filemon_close(struct filemon *F) { int error = 0; +#ifdef FILEMON_FLUSH_IOCTL + /* + * Ask the kernel to write the footer and flush the trailing records to + * the output file *now*, synchronously, before we close the device. + * Otherwise finalization happens only at device release, which the + * kernel defers until the last reference to the device is dropped; a + * child that transiently inherited this fd across a fork->exec window + * can hold that reference past our read of the output file, yielding a + * truncated .meta (records + "# Bye bye" footer missing). + */ + (void)ioctl(F->fd, FILEMON_FLUSH_IOCTL); +#endif + /* Close the filemon device fd. */ if (close(F->fd) == -1 && error == 0) error = errno; |
