> > Hmmm -- I'm not seeing this. Can you post for each of the two
> > test cases:
> >
> > -- the fopen() call that is used.
> >
> > -- the command line that is used to run the program.
> >
> > -- the results of grep the strace output using:
> >
> > egrep '(mmap|open|read)'
> Sure, (using strace -e mmap2,open,read instead):
>
> fopen "r":
> |...
> |open("/tmp/fp.c", O_RDONLY) = 3
> |mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb7f3a000
> |read(3, "#include <sys/types.h>\n#include "..., 4096) = 460
> |read(3, "", 4096) = 0
>
> fopen "r+m":
> |...
> |open("/tmp/fp.c", O_RDWR) = 3
> |mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb7f8e000
> |read(3, "#include <sys/types.h>\n#include "..., 4096) = 462
> |read(3, "", 4096) = 0
>
> fopen "rm":
> |...
> |open("/tmp/fp.c", O_RDONLY) = 3
> |mmap2(NULL, 461, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f1c000
Okay -- that look good. But it's strange, I'm not seeing the
same as you on SUSE 10.0, glibc 2.3.5. Do you have another Linux
to hand to test?
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance?
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source
files for 'FIXME'.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]