This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2417
  getcwd() uses ENAMETOOLONG instead of ERANGE Last modified: 2006-04-01 20:57:35
     Query page      Enter new bug
Bug#: 2417   Hardware:   Reporter: Aurelien Jarno <aurelien@aurel32.net>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: WONTFIX   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
getcwd_errno.patch proposed patch patch 2006-03-05 16:54 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2417 depends on: Show dependency tree
Show dependency graph
Bug 2417 blocks:

Additional Comments:


Leave as RESOLVED WONTFIX
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-03-05 16:52
A call to getcwd() with a buffer smaller than the actual path returns an error
ENAMETOOLONG on all architectures but ia64, whereas POSIX and the *GNU libc
manual* say ERANGE. Actually this is the value returned by the kernel.

IMHO the kernel has to be fixed, but the GNU libc should also correct the
number. That's the purpose of the attached patch.

------- Additional Comment #1 From Aurelien Jarno 2006-03-05 16:54 -------
Created an attachment (id=902)
proposed patch

------- Additional Comment #2 From Dwayne Grant McConnell 2006-03-10 17:12 -------
When you say "on all architectures but ia64" do you mean this is true for the
generic kernel or is this Debian specific? On OpenSUSE x86 10.0 I get ERANGE.

I do not see why glibc should put in a patch to work around a bug in the kernel.
This bug should be fixed in the kernel only. If glibc put in a workaround for
every simple kernel bug which code be fixed the code would quickly become
unmanageable.

------- Additional Comment #3 From Dwayne Grant McConnell 2006-03-10 17:12 -------
s/code be fixed/could be fixed/

------- Additional Comment #4 From Ulrich Drepper 2006-04-01 20:57 -------
There is no problem in libc and I cannot see anything wrong in the current
kernel sources either.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In