[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave 2.1.29 available for ftp (fclose() bug?)
From: |
Joao Cardoso |
Subject: |
Re: Octave 2.1.29 available for ftp (fclose() bug?) |
Date: |
Sat, 25 Mar 2000 16:30:01 +0000 |
Hi,
The following shows a bug in octave-2.1.29 compiled with gcc-2.95.2 on
sco-3.2v5.0.4.
It seems that fclose() does not actually closes the stream until another
fopen() is issued on the same file:
octave:1> fp = fopen("popo","w")
fp =
{
id = 3
name = popo
mode = w
arch = native
status = open
}
octave:2> fprintf(fp,"Hello dolly\n")
ans = 12
octave:3> fclose(fp)
ans = 0
octave:4> system("ls -l popo")
-rw-r--r-- 1 root sys 0 Mar 25 16:23 popo
ans = 0
octave:5> fp = fopen("popo","r")
fp =
{
id = 3
name = popo
mode = r
arch = native
status = open
}
octave:6> fclose(fp)
ans = 0
octave:7> system("ls -l popo")
-rw-r--r-- 1 root sys 12 Mar 25 16:23 popo
ans = 0
Joao
--
Joao Cardoso, address@hidden
"Science is like sex: sometimes something useful comes out, but that is
not the reason we are doing it" -- Richard Feynman