Re: Bug Report?! Part II.
Helmut Metzdorf <h-j-m@tap.de> writes:
> stat(XFileName, File_Info);
>
> i think the definitions were ok or the compiler would have
> complained.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x400903e0 in __xstat ()
This is what I get if File_Info is bad, e.g. if I try to pass an
integer instead of a pointer to File_Info. The compiler will probably
complain, if you compile with -W -Wall.
You should really be checking the return code from stat() too. What
happens if XFileName doesn't exist? If this is too much trouble, use
a language like Python, Tcl or bash (with set -e) which will fall over
nicely when you get an error.
--
Carey Evans http://home.clear.net.nz/pages/c.evans/
"So, do you steal weapons from the Army often?"
"Well, we don't get cable, so we have to make our own fun."
Reply to: