On 29 August 2012 06:07, ольга крыжановская <olga.kryzhanov...@gmail.com> wrote: > Does any one see a reason why fstatat(dirfd, ".",&sb, ...) can not be > replaced with fstat(dirfd, &sb)?
At least on Linux both calls are equal. Be careful with fstatat() and make the flags field 0, the flag value AT_SYMLINK_NOFOLLOW will make it equal to lstat(). IMO it would be a good idea to replace all calls to stat(".",&sb) with fstat() calls within the shell (which already keeps track of the current cwd with shp->pwfd) to make such calls faster. stat() always includes a path lookup and permission checks which fstat() doesn't have to do. Lionel _______________________________________________ ast-developers mailing list ast-developers@research.att.com https://mailman.research.att.com/mailman/listinfo/ast-developers