#1976: System.Posix.User.getUserEntryForName: incorrect error for non-existent
user
----------------------------+-----------------------------------------------
 Reporter:  guest           |          Owner:                
     Type:  bug             |         Status:  new           
 Priority:  normal          |      Milestone:  6.8.3         
Component:  libraries/unix  |        Version:  6.8.2         
 Severity:  normal          |     Resolution:                
 Keywords:  errno           |     Difficulty:  Easy (1 hr)   
 Testcase:                  |   Architecture:  x86_64 (amd64)
       Os:  Linux           |  
----------------------------+-----------------------------------------------
Changes (by tac-tics):

  * keywords:  => errno

Comment:

 The reason for this is that getUserEntryForName uses a POSIX function
 getpwnam_r for its underlying implementation. In the event the user isn't
 found, getpwnam_r doesn't actually mess with errno at all, but instead
 relies on its 5th parameter to indicate an error. getUserEntryForName
 correctly detects the error, but since neither it nor getpwnam_r sets
 errno, the text string it displays is Success instead of something more
 appropriate.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1976#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to