[systemd-devel] [ANNOUNCE] systemd 190

Colin Guthrie gmane at colin.guthr.ie
Sat Sep 22 01:42:11 PDT 2012


'Twas brillig, and Lennart Poettering at 20/09/12 21:39 did gyre and gimble:
> Heya!
> 
> Many many bugfixes, but also a number of smaller features:
> 
> http://www.freedesktop.org/software/systemd/systemd-190.tar.xz
> 
> CHANGES WITH 190:

Probably also worth mentioning a slight semantic change in the
sd_uid_get_sessions() and sd_uid_get_seats() functions in this release.

These both take an require_active argument. Previously a value of 0 vs.
1 would control whether the sessions were "active" (1) or not (0). Now
it takes there values. The semantics of 0 remain the same, but 1 now
only covers online or active sessions, and does not include sessions
that are currently in the process of closing which the old semantics
included as "active". A value of -1 will still allow the old semantics.

Here is the updated man page content:
                sd_uid_get_sessions() may
                be used to determine the current sessions of the
                specified user. Acceptes a Unix user identifier as
                parameter. The require_active
                parameter controls whether the returned list shall
                consist of only those sessions where the user is
                currently active (> 0), where the user is currently
                online but possibly inactive (= 0), or
                logged in at all but possibly closing the session
                (< 0). The call returns a
                NULL terminated string array of session identifiers in
                sessions which needs to be
                freed by the caller with the libc free
                call after use, including all the strings
                referenced. If the string array parameter is passed as
                NULL the array will not be filled in, but the return
                code still indicates the number of current
                sessions. Note that instead of an empty array NULL may
                be returned and should be considered equivalent to an
                empty array.

                Similar, sd_uid_get_seats()
                may be used to determine the list of seats on which
                the user currently has sessions. Similar semantics
                apply, however note that the user may have
                multiple sessions on the same seat as well as sessions
                with no attached seat and hence the number of entries
                in the returned array may differ from the one returned
                by sd_uid_get_sessions().

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list