access()
To: None <noses@oink.rhein.de>
From: Chris G. Demetriou <cgd@postgres.Berkeley.EDU>
List: netbsd-bugs
Date: 03/04/1994 14:23:40
> >Description:
>
> Function access () in unistd.h doesn't return 0 on success - it's
> returning 1. This is breaking sliplogin which is expecting 0 to be
> returned. Probably other programs are breaking too.
"hmm":
245 [sun-lamp] tmp % cat foo.c
#include <unistd.h>
main()
{
printf("%d\n", access("/netbsd", R_OK));
printf("%d\n", access("/netbsd", W_OK));
printf("%d\n", access("/netbsd", X_OK));
printf("%d\n", access("/netbsd", R_OK|W_OK));
printf("%d\n", access("/netbsd", W_OK|X_OK));
printf("%d\n", access("/netbsd", R_OK|X_OK));
printf("%d\n", access("/netbsd", R_OK|X_OK|W_OK));
}
246 [sun-lamp] tmp % cc foo.c
247 [sun-lamp] tmp % a.out
0
-1
0
-1
-1
0
-1
248 [sun-lamp] tmp %
I don't see this bug.
could you provide a sample that shows it?
cgd
------------------------------------------------------------------------------