On martedì 11 settembre 2007, Jeff Dike wrote: > On Tue, Sep 11, 2007 at 04:00:58PM +0200, Blaisorblade wrote: > > errno = 24 means EMFILE (too many open files). > > Whoops, I mentally turned that into -ENOMEM. > > Maybe we should resurrect os_print_error as you suggested and start > using it. The current habit of using raw errnos dates from very > early, when perror (or strerror - I don't remember which) gave me > undebuggable segfaults deep inside libc. Probably, that's not a > problem any more.
I surely agree. I also think I had introduced os_print_error and exactly for this purpose, even if I can't recall well. strerror() is not reentrant so it can't be used, but there is strerror_r. There is no strsignal_r (using strsignal(3) would clear messages as "Kernel mode signal 8"), but I'd suggest to follow the unrecommended but documented practice of using sys_siglist[signr]. -- "Doh!" (cit.), I've made another mistake! Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
