|
Message-ID: <20191219084302.GC986899@wirbelwind.zhasha.com> Date: Thu, 19 Dec 2019 09:43:02 +0100 From: Joakim Sindholt <opensource@...sha.com> To: musl@...ts.openwall.com Subject: Re: mmap implementation confusion On Thu, Dec 19, 2019 at 03:37:14AM -0500, Alex Brachet-Mialot wrote: > In src/mman/mmap.c mmap (after light einval checks) just returns the result > of the syscall directly. But presumably the OS returns -E* and not -1 for > all failures. Otherwise something like EBADF could never go reported. > Presumably musl is compliant here and returns -1 on error and not the > negative value from the OS but I’m not seeing that logic. Am I missing > something here? Thanks. It returns (void *)__syscall_ret(ret) Have a look in src/internal/syscall_ret.c
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.