Bug#175755: fopen does not positions the stream at the end of the file in mode a+
At 07 Jan 2003 23:02:03 +0100,
Ander wrote:
> Package: libc6
> Version: 2.3.1-8
> Severity: critical
>
> Opening a file with fopen in mode a+ will position the stream at the
> begining of the file and not at the end.
>
> I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
> 2.3.1-8
>
Send us minimal test program.
You have to check below test. You find it works fine.
gotom:~> cat 175755.c
#include <stdio.h>
main()
{
FILE *fp;
fp = fopen("/tmp/aaa", "a+");
fwrite("a\n", 1, 2, fp);
}
gotom:~> cat /tmp/aaa
---------------
gotom:~> gcc 175755.c
gotom:~> ./a.out
gotom:~> cat /tmp/aaa
---------------
a
gotom:~>
-- gotom
Reply to: