directory change notification patch

Derrell.Lipman at UnwiredUniverse.com Derrell.Lipman at UnwiredUniverse.com
Mon Mar 28 03:39:05 GMT 2005


Jeremy Allison <jra at samba.org> writes:

> I've reviewed it *very* crefully, and wrote sume test code to reproduce
> the races. His fix (in sys_select) is correct, the fix in sys_select_intr
> is a little overkill (IMHO) so I've trimmed down the paranoia a little.

I was just looking over the sys_select patch.  I think I'd make one change to
it: if select() says there's something on the pipe:

  if (FD_ISSET(select_pipe[0], readfds2))

then I would tend to err towards returning EINTR *even if* the read() does not
return 1.  I think it can't hurt.  It *should* never occur that select() says
there's something there when read() says there isn't.  Actually, I just
thought of a case: if a signal occurs during that read from the pipe, the read
could return -1.  (Did we then just lose proper count?  Any time interrupts
are involved, it gets hairy. :-) No, I think we're still kosher even if that
occurs.)

> BTW Derrell, thanks for explaining the problem in Very Simple Words of
> one syllable so I got it :-).

I'm told I'm a good teacher.  I guess maybe my method of explaining gives rise
to those comments.  Anyway, no problem.  Glad to help.

Cheers,

Derrell


More information about the samba-technical mailing list