directory change notification patch

Jeremy Allison jra at samba.org
Mon Mar 28 02:10:54 GMT 2005


On Sun, Mar 27, 2005 at 07:53:46PM -0500, Derrell.Lipman at UnwiredUniverse.com wrote:
> 
> Let's say we're passed readfds with 1 file descriptor to read from, i.e. one
> bit set.  readfds2 is assigned readfds, and then the pipe file descriptor is
> added to readfds2.  There are now two file descriptors specified in readfds2.
> assume for the moment that nothing is specified in writefds nor errorfds.
> 
> select() is called when data is available on the data file descriptor provided
> by the user AND when there has been a signal so the pipe fd has data
> available.  select() will return 2 because there is data available on two file
> descriptors: the user fd and the pipe fd.

Hmmmmm. This might be the walkthough I was looking for :-). I wasn't
thinking of the two fd's case... I was assuming the signal would just
cause the (ret == 1) case to return EINTR.... We could lose signals in
this case. I'm guessing the reason we haven't suffered with this until
now is that we get interrupted enough and the oplock breaks are stored
so we don't lose them, but we would lose change notify signals....

I guess I'm wrong and he's right in both cases it looks like. I owe
him an apology. Sometime having your source code out there *sucks* :-) :-).
Especially when it has subtle bugs (and I'm saying they're subtle 'cos
this stuff has been out there forever and no-one else noticed :-).

Feeling very stupid... :-),

Jeremy.


More information about the samba-technical mailing list