System.Posix.User.getAllUserEntries can be called only once

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

System.Posix.User.getAllUserEntries can be called only once

Sascha Böhme
Hello,

are there special constraints why the function

  System.Posix.User.getAllUserEntries

of the unix package can be called only once? Beginning with the second
call, it only returns the empty list. Thus, this function cannot be
used for a long running process which needs to query the user database
from time to time, again and again.

Thanks,
Sascha


_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: System.Posix.User.getAllUserEntries can be called only once

Ian Lynagh
On Mon, Jul 16, 2007 at 01:49:31PM +0200, Sascha Böhme wrote:
>
> are there special constraints why the function
>
>   System.Posix.User.getAllUserEntries
>
> of the unix package can be called only once?

It's a bug, fixed in the HEAD.

To do it in 6.6.1 you'd have to call C's setpwent and endpwent yourself,
before and after calling getAllUserEntries.


Thanks
Ian

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries