I was asking about advanced facilities for getting information about
changes to various system facilities.  The following posting from
Jonathan Lemon about facilities in FreeBSD was in response to
better monitoring facilities for system events.

I like it,  I like it.  But it would be nice if I did not have to
scan the entire spool queue...

> From [EMAIL PROTECTED] Mon Jul 17 09:32:53 2000
> Date: Mon, 17 Jul 2000 11:37:26 -0500
> From: Jonathan Lemon <[EMAIL PROTECTED]>
> To: "Daniel C. Sobral" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: kqueue & LPRng
>
> I think both of these are covered:
>
> For the first point, you monitor the directory, and a event will 
> be triggered whenever the directory changes.  In order to find out
> exactly what changed, you still need to read the directory contents.
> (The directory is treated as a file, so you simply get notified
> whenver the file changes).
>
> For the second, the EVFILT_SIGNAL filter will trigger an event 
> whenver a signal that you are monitoring is posted to the process.
> For example, given the following fragment of code, which registers
> a filter for SIGUSR1, and then blocks delivery of the SIGUSR1 signal,
> an event will be returned when the signal is posted, even though
> the signal will not be delivered to the process until it is unblocked.
>
>       sigset_t set;
>
>         kev.ident = SIGUSR1;
>         kev.filter = EVFILT_SIGNAL;
>         kev.flags = EV_ADD | EV_ENABLE;
>
>         sigemptyset(&set);
>         sigaddset(&set, SIGUSR1);
>         sigprocmask(SIG_BLOCK, &set, NULL);
>
>         n = kevent(kq, &kev, 1, &kev, 1, NULL);
>
>
> I hope that this addersses your questions.  The behavior of the event
> delivery depends on the specific filter used, and the filters are designed
> to be extensible.
> --
> Jonathan
>
>
>
> On Tue, Jul 18, 2000 at 01:13:27AM +0900, Daniel C. Sobral wrote:
> > -------- Original Message --------
> > From: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > 
> > Yes, this looks good.
> > 
> > Seem to be missing a couple of 'build ins':
> > 
> > a)  Directory Entries:
> >     files added or removed from directory - or is this covered
> >     under the 'file modification' facilities
> > 
> > b)  Pending signals for your own process
> > 
> >     I don't see a facility to determine if there are pending signals
> >     for your own process.  This would be invaluable to allow you to
> >     mask and monitor stuff using the same mechanism.
> > 
> > Just some comments...
> > 
> > Patrick
>

-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to