Subject: Re: Replacement for grep(1) (part 2)
To: None <>
From: Christos Zoulas <>
List: tech-userlevel
Date: 07/07/1999 19:24:57
In article <>,
Dag-Erling Smorgrav <> wrote:
>Don't use err() indiscriminately after a malloc() failure; malloc()
>doesn't set errno.

Oh, please check better; malloc does not set errno directly, but
the system calls that it uses do. mmap() in particular can return
other errors than ENOMEM. Finally, I believe that malloc is required
to set errno by the Single Unix Specification