Re: Bug Report?! Part II.
- To: email@example.com
- Subject: Re: Bug Report?! Part II.
- From: Carey Evans <firstname.lastname@example.org>
- Date: 25 Oct 1998 12:17:57 +1300
- Message-id: <email@example.com>
- In-reply-to: Helmut Metzdorf's message of "Wed, 21 Oct 1998 00:05:57 +0200 (CEST)"
- References: <13869.2169.334310.950194@JonnyB>
Helmut Metzdorf <firstname.lastname@example.org> writes:
> stat(XFileName, File_Info);
> i think the definitions were ok or the compiler would have
> 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."