Hi, Linus!
On Thu, 2005-07-28 at 17:30 -0700, Linus Torvalds wrote:
> _always_ save the value of errno before doing any other calls. Even
> successful calls are perfectly allowed to change errno.
OK. Fixed patch below.
Signed-off-by: Pavel Roskin <[EMAIL PROTECTED]>
diff --git a/diff.c b/diff
On Thu, 28 Jul 2005, Morten Welinder wrote:
>
> > I have verified that successful close() after failed mmap() won't reset
> > the output of perror() to "Success".
>
> Does $standard guarantee that?
>
> In general, successful libc calls can set errno to whatever they
> please, except zero. And
> I have verified that successful close() after failed mmap() won't reset
> the output of perror() to "Success".
Does $standard guarantee that?
In general, successful libc calls can set errno to whatever they
please, except zero. And they sometimes do. This follows from
C99.
Morten
-
To unsubs
Hello!
I have reviewed all occurrences of mmap() in git and fixed three types
of errors/defects:
1) The result is not checked.
2) The file descriptor is closed if mmap() succeeds, but not when it
fails.
3) Various casts applied to -1 are used instead of MAP_FAILED, which is
specifically defined t
4 matches
Mail list logo