From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 17672 invoked from network); 1 Jun 1998 20:31:42 -0000 Received: from alpha.nmrlab.hscsyr.edu (139.127.65.86) by mail2.redhat.com with SMTP; 1 Jun 1998 20:31:42 -0000 Received: (from mike@localhost) by alpha.nmrlab.hscsyr.edu (8.8.7/8.8.7) id LAA07657; Mon, 1 Jun 1998 11:52:37 -0400 Date: Mon, 1 Jun 1998 11:52:37 -0400 From: Mike Message-Id: <199806011552.LAA07657@alpha.nmrlab.hscsyr.edu> To: axp-list@redhat.com, joeyen@alpha.nmrlab.hscsyr.edu Subject: stat() broken under RH 5.0?? We cannot get stat (in a C program, not the shell command) to work correctly under RedHat 5.0 running on an alpha (kernel 2.0.30). Any help would be appreciated or any work around that returns the file mode for a given file. Here is the code we are using (it works fine under SunOS) and according to the man pages it should work okay on the alpha as well. It compiles okay but segmentation faults. gdb gives the following error Program received signal SIGSEGV, Segmentation fault. __xstat () at ../sysdeps/unix/sysv/linux/xstat.c:52 ../sysdeps/unix/sysv/linux/xstat.c:52: No such file or directory. #include #include #include main() { struct stat *buf; stat("teststat.c",buf); printf("%d\n",buf->st_mode); } Thanks Mike