From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: elogind status Date: Thu, 27 Aug 2015 15:58:29 +0200 Message-ID: <87io80zvcq.fsf@igalia.com> References: <87h9ntexrp.fsf@igalia.com> <878u8z7qqr.fsf@igalia.com> <87y4gwzwvj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxhx-0006mj-6x for guix-devel@gnu.org; Thu, 27 Aug 2015 09:59:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUxhu-0005OF-0a for guix-devel@gnu.org; Thu, 27 Aug 2015 09:59:13 -0400 In-Reply-To: <87y4gwzwvj.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 27 Aug 2015 15:25:36 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org On Thu 27 Aug 2015 15:25, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo skribis: > >> I will keep this patch stack up to date at wip-pam-elogind. On that >> branch there's an update to a new elogind that includes systemd's code >> to suspend/hibernate/hybrid-sleep the system, as well as new code to >> implement the poweroff/halt/reboot things. > > How does poweroff/halt/reboot works? > > On GuixSD, =E2=80=98halt=E2=80=99 & co. make an RPC to dmd so that it ter= minates all the > services (including file system mounts) in the right order. > > Anyway, good stuff! Currently poweroff and halt both invoke the "halt" executable, whose full path is captured at build-time if available and otherwise searched in the path. In Guix the full path is captured. Poweroff and halt are the same on modern systems, aren't they? Dunno. Reboot invokes reboot, captured in the same way, and the same for kexec. Anyway for Guix this should do the right thing, no? It waits for the exec'd program to return and checks the error code. I guess the actual halt is async though of course. Suspend/hibernate/hybrid-sleep all write to /sys/power/disk and /sys/power/state. Andy