Re: Selects on dirs/files.

From: N. Jason Kleinbub (
Date: Tue Feb 13 2001 - 14:53:52 EST

Manfred Spraul wrote:

> "N. Jason Kleinbub" wrote:
>> People,
>> Not sure where to go from here but ....
>> ( Yes I have read the FAQ )=
>> For practical reasons, I have created some modification to the
>> Linux kernel. These changes were to make our implementation of
>> software more convenient (elegant). Essentially, I have modified the
>> select() calls to allow the non-trivial use of directories as an 'fd'.
> Have you checked the F_NOTIFY fcntl()?
> If yes, what's the difference between your patch and F_NOTIFY?

The biggest impediment that I saw with F_NOTIFY was the inability
to distinguish _which_ directory generated the signal. This was
especially problematic for multithreaded apps. Also I would have
a chance of missing the signal if they pile ontop of each other.
Everytime I was interupted from my sleep() by a signal I would
have to scan _each_ directory to find the next file.

I admit, however, that the current F_NOTIFY has more functionality
then the current select().

Plus, for our programmers, it is a stylistic choice. They prefer,
and better understand, using select()/poll() versus signal io.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:22 EST