#3816: System.Posix.GetAllGroupEntries returns 0 groups for 2nd and subsequent
calls
------------------------------------------------+---------------------------
Reporter: tphyahoo | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Keywords: groups getAllGroupentries posix | Difficulty: Unknown
Os: Linux | Testcase: in description
Architecture: x86_64 (amd64) | Failure: None/Unknown
------------------------------------------------+---------------------------
This is on 6.10.4, could someone check whether still a bug on 6.12?
#haskell Jan 11 2010:
<patch-tag> liftM length System.Posix.getAllGroupEntries
<patch-tag> 1819
<patch-tag> Prelude System.Posix Control.Monad> liftM length
<patch-tag> 0
lispy/cale confirmed behavior, and cale suggested fix:
<lispy> patch-tag:
http://www.haskell.org/ghc/docs/6.10.4/html/libraries/unix/src/System-
Posix-User.html#getAllGroupEntries
<Cale> getAllUserEntries =
<Cale> withMVar lock $ \_ -> bracket_ c_setpwent c_endpwent $ worker
[]
<Cale> getAllUserEntries is properly bracketed
<Cale> getAllGroupEntries = withMVar lock $ \_ -> worker []
<lispy> http://linux.about.com/library/cmd/blcmdl3_getgrent.htm
function has changed from 6.10.4 to 6.12 but I'm not sure if this fixed
the bug:
6.10.4: http://www.haskell.org/ghc/docs/6.10.4/html/libraries/unix/src
/System-Posix-User.html#getAllGroupEntries
6.12:
http://hackage.haskell.org/packages/archive/unix/2.4.0.0/doc/html/src
/System-Posix-User.html
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3816>
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