On 5 June 2012 10:59, David E. O'Brien <obr...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to