svn commit: r236593 - head/share/man/man4
Andrew Thompson
thompsa at FreeBSD.org
Mon Jun 4 23:07:49 UTC 2012
On 5 June 2012 10:59, David E. O'Brien <obrien at freebsd.org> wrote:
> Author: obrien
> Date: Mon Jun 4 22:59:06 2012
> New Revision: 236593
> URL: http://svn.freebsd.org/changeset/base/236593
>
> Log:
> Add a man page for filemon(4) [r236592].
> +static void
> +open_filemon(void)
> +{
> +
> + if ((child = fork()) == 0) {
> + /* Do something here. */
> + return 0;
> + } else {
> + if (ioctl(fm_fd, FILEMON_SET_PID, &child) < 0)
> + err(1, "Cannot set filemon PID");
> + wait(&child);
> + close(fm_fd);
> + }
> + return 0;
Does the race have to be managed between the parent SET_PID ioctl and
the child doing something?
Andrew
More information about the svn-src-head
mailing list