lkml.org 
[lkml]   [2001]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Selects on dirs/files.


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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.732 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site