Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Sep 2015 01:04:06 -0700
From:      Colin Percival <cperciva@freebsd.org>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        Jung-uk Kim <jkim@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>, "freebsd-acpi@freebsd.org" <freebsd-acpi@FreeBSD.org>, Dan Lukes <dan@obluda.cz>
Subject:   Re: disabling sleep when shutting down
Message-ID:  <5607A2F6.60204@freebsd.org>
In-Reply-To: <20150927164605.U29510@sola.nimnet.asn.au>
References:  <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> <55FB48E3.20401@freebsd.org> <55FC4F13.3090603@FreeBSD.org> <55FC57F9.3050702@yahoo.com> <55FE5D54.1030806@freebsd.org> <5601A863.5070406@FreeBSD.org> <560262BF.7090107@freebsd.org> <5602DE8D.3020102@FreeBSD.org> <560648A7.4030708@freebsd.org> <20150927024553.L29510@sola.nimnet.asn.au> <5606EA4A.3090705@freebsd.org> <20150927164605.U29510@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/27/15 00:07, Ian Smith wrote:
> On Sat, 26 Sep 2015 11:56:10 -0700, Colin Percival wrote:
>  > Ok, so you're satisfied with having the suspend-disabling triggered by
>  > init (i.e., not happening until shutdown(8) reaches "now")?
> 
> Sure, if you're satisfied that 'shutdown [..] now' - or hitting the 
> power button as Dan mentioned - then quickly closing the lid will lose 
> that race.  As you say, with this mechanism in place, accessing it from 
> shutdown(8) would be straightforward if deemed necessary.  So, yes.

I'll check before committing, but I'd be very surprised if you could close
the lid of a laptop in the window between hitting enter on 'shutdown -p now'
and when init sets the sysctl.  The code path is very direct... we should be
talking a few ms at most.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5607A2F6.60204>