|
From: Josef W. <Jos...@gm...> - 2003-10-30 12:31:10
|
Ok. I have no problem with this semantic change of return codes (libc vs. kernel). But this is a source incompatible change in the skin API. Can we raise the skin major version for it? Josef On Thursday 30 October 2003 11:35, Nicholas Nethercote wrote: > On Thu, 30 Oct 2003, Jeremy Fitzhardinge wrote: > > No. strace is (somewhat) lying - the syscall is returning -2, not -1. > > If you were using libc, then open() would return -1 and set errno to 2 > > (ENOENT). But since we're going straight to the kernel and don't have > > errno, VG_(open) is directly returning the negative error code (-2 == > > ENOENT). > > The different views of syscalls -- glibc's view vs. the kernel's view -- > has tripped me up before. Generally, the kernel returns a negative error > value, and then glibc puts that in errno (but positive), and returns -1 > from the call. There are some cases where the kernel vs. glibc difference > is bigger -- I think mmap, brk and getcwd are examples. > > N > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |