[GHC] #1487: unix package: test needed for getLoginName

GHC ghc-devs at haskell.org
Sat Aug 23 01:23:39 UTC 2014


#1487: unix package: test needed for getLoginName
-------------------------------------+-------------------------------------
              Reporter:  simonmar    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  lowest      |        Milestone:
             Component:              |          Version:
  libraries/unix                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:  Linux       |       Difficulty:  Easy (less than 1
       Type of failure:  Incorrect   |  hour)
  result at runtime                  |       Blocked By:
             Test Case:              |  Related Tickets:  #8293
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by thomie):

 @ezyang: which terminal emulator are you using? Does it work with `xterm`?

 Maybe we should change the signature of `getLoginName` to:

 {{{
 getLoginName :: IO (Maybe String)
 }}}

 , since the man page explicitly mentions that
 [http://linux.die.net/man/3/getlogin getlogin] can return NULL:

 {{{
 getlogin() returns a pointer to a string containing the name of the
 user logged in on the controlling terminal of the process, or a NULL
 pointer if this information cannot be determined.
 }}}

 The same applies to `getGroupEntryForID`, ticket #8293.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1487#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list