Hi wolf_core
I decided to take a look at the source code to see if I could figure out what the program is complaining about. I noticed
that the author was misusing the errno variable. Open the file called main.c and find the phrase:
|| errno_save != 0
Remove all three instances of that phrase, not he whole line, just that exact phrase. Recompile the program and
see if it behaves any better.
Rich, explain to me how these three statements, as you put it,
was misusing the errno variable?
if (bWrite < 0 || errno_save != 0) {
if (bWrite < 0 || errno_save != 0) {
if (bWrite < 0 || errno_save != 0) {
According to the errno(3) - Linux man page
"Valid error numbers are all nonzero;
errno is never set to zero by any system call or library function. "
So what the above code is doing is that if fprintf() or fscanf() had a problem bWrite will indicate that and we don't even care what errno is because we don't even check it then at that point. But, if for some reason errno is *not* zero which should not happen without an error actually occurring as indicated by the function(s) return code, I want to know about it. Because that is not right.
I appreciate you bringing this to my attention but I wish wolf_core would have contacted me directly. I fear the problem may lie elsewhere and I'd rather get to the root cause.
What I suspect here is that errno_save is not zero because on the system in question errno is not initialized to zero. I'd like to confirm that and address that. This does not happen on other distributions that I know of.
I'd like to see the debug output from aurora when this occurs by using the -b option as the first option on the line. wolf_core if you can go back to the original code and do that and send it to me directly I'm more then willing to figure out what's going on and make any corrections necessary.
-The author of aurora...