Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/share/man/man4



On Wed, 6 Jan 2016, Christos Zoulas wrote:

As a temporary hack it is probably good enough. Longer term filemon
should be removed/rewritten, and the close ordering problem should
be handled.

I think that a "better" approach here is probably to remove filemon(4)'s SET_FD ioctl (for the log_file fd) completely, and use the fd on which /dev/filemon is open to deliver the activity/event records. But this will reduce performance, as each activity would require two transitions over the kernel/user-land boundary (one to deliver the data to the monitoring application, and another one to store the data somewhere).

I changed my mind; it does not help because one can always dup2
that file descriptor later to a lower fd and cause trouble. It is
also confusing to the user. So it is really not a worthwhile hack
to put. Perhaps a better hack is to have a filemon_disestablish
hook at process exit that does the preliminary cleanup.

Yep, the user could always shoot himself (and the system) in the foot!

Let me see if I can come up with a exit_cleanup() implementation that is sufficiently clean as to be acceptable.


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index