[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Re: error.c: "Unknown system error" should report errno value

From: Martin Koeppe
Subject: Re: Fwd: Re: error.c: "Unknown system error" should report errno value
Date: Sun, 7 Oct 2007 21:47:47 +0200 (CEST)

On Sun, 7 Oct 2007, Jim Meyering wrote:
Martin Koeppe <address@hidden> wrote:
The test tests/rm/dir-nonrecur shows IMO a real bug in coreutils,
"rm d" should fail at
remove.c:1094  with   "cannot remove 'd':  Is a directory"
but fails there with  "cannot remove 'd':  No such file or diectory"

If I remove the translation call _() around the text, then it fails
correctly with "Is a directory".  I think failures during translation
shouldn't change the errno reported.

Thanks for investigating.
If it's happening the way you say, then gettext must change, and fail
to restore errno.  Are you using the latest version of gettext?
Why do you think that's a bug in coreutils?

Can you provide something like strace/truss output?

truss output is attached. I added 'perror("errno=");' just before
remove.c:1094, to see errno before the gettext call.

I'm using gettext 0.16.1 and libiconv 1.11. I now read the gettext(3) man page. It says: "errno is not modified". I only thought coreutils could use the possibility to avoid this sort of bugs by saving errno elsewhere before calling gettext(). If the gettext(3) man page is to read as "errno is guaranteed not to be modified" then it's a gettext() bug of course.

BTW, the tests mv/dir2dir and rm/dir-no-w fail due to very probably the same issue. Will try to --disable-nls and retest.


Attachment: rm.truss2
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]