Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!wuarchive!julius.cs.uiuc.edu!apple!ames!dftsrv!jagmac2.gsfc.nasa.gov!jim From: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Newsgroups: comp.unix.aux Subject: stat(), lstat() again. Message-ID: <3422@dftsrv.gsfc.nasa.gov> Date: 14 Sep 90 18:31:48 GMT Sender: news@dftsrv.gsfc.nasa.gov Reply-To: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Organization: NASA Goddard Space Flight Center Lines: 21 Well... if I do the following, lstat() doesn't work: struct stat *sbuf; lstat("/unix", sbuf); But this DOES: struct stat sbuf; lstat("/unix", &sbuf); It looks like in case #1, sbuf is pointing somewhere dangerous and when lstat is called, memory is destroyed... -- ======================================================================= #include =:^) Jim Jagielski NASA/GSFC, Code 711.1 jim@jagmac2.gsfc.nasa.gov Greenbelt, MD 20771 "Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach the very, very top, and then it tends to slope away rather sharply."