[systemd-devel] sd_get_uids gives a sorted list?
Stef Bon
stefbon at gmail.com
Thu Jul 26 06:36:24 PDT 2012
2012/7/26 Kay Sievers <kay at vrfy.org>:
> On Thu, Jul 26, 2012 at 2:16 PM, Stef Bon <stefbon at gmail.com> wrote:
>> I'm implementing the sd_get_uids function in my app. It basically
>> reads the directory /run/systemd/users.
>> I do not know, is this list already sorted?? this is the same question
>> as is the readdir function "sort" sensitive?
>
> readdir() in many cases returns stuff in reverse order of creation,
> the order is not defined, and it is never sorted.
>
> Kay
Thanks,
I've added the sort function. It is easy, uids is a simple array with
length known.
Stef
More information about the systemd-devel
mailing list