bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assertion fault. on loggin


From: Pierre
Subject: Re: assertion fault. on loggin
Date: 12 Sep 2003 02:29:33 -0700

> Ok.  Here's the latest test, I want to find out if 4 is still
> working at the time that 3 is still working.
And the result is...

When fstat(4,&s) is call when fn is 3, it returns 0 and then still
returns 0 when fn is 4 !
I mean with your last test code, there is no more bug... !!

with this code :

/* beginning of the new code */
int fn;
fn = fileno (bc->fp);
if (fn == 3) 
 {
  assert (fstat ( fn+1, &s ) != -1);
 }
/* return to the original code */
assert (fstat ( fileno (bc->fp), &s ) != -1); 

No assert is raised !

Is it possible to write this code in a cleaner way ? (I think fn==3
may not be the good test every time, and the same with fn+1)

Thanks,

Pierre


reply via email to

[Prev in Thread] Current Thread [Next in Thread]