Rich.Brown at Sun.COM writes:
> The code snippet would now look like this:
>
> struct stat statPre;
> struct stat statFile;
> DIR *pdir;
>
> stat(szPath, &statPre);
> pdir = opendir(szPath);
>
> if (S_ISTRIGGER(statPre.st_mode)) {
> stat(szPath, &statPre);
> }
>
> fstat(pdir->dd_fd, &statFile);
>
> if (statPre.st_ino != statFile.st_ino ||
> statPre.st_dev != statFile.st_dev) {
> return(EAGAIN);
> }
If doing the stat() call after opendir() works correctly for trigger
points, why would it not work for all other object types?
I don't quite see what the stat-after-opendir tells you that the
fstat() does not.
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677