From: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: 66387@debbugs.gnu.org
Subject: [bug#66387] [PATCH] home: services: Fix race condition when detecting first login
Date: Tue, 10 Oct 2023 00:08:06 +1100 [thread overview]
Message-ID: <87bkd8djri.fsf@zancanaro.id.au> (raw)
In-Reply-To: <cd5b7553c4d6908505a010d687293eef41d4f2d8.1696679945.git.carlo@zancanaro.id.au>
On Sat, Oct 07 2023, Carlo Zancanaro wrote:
> @@ -412,20 +413,29 @@ (define (compute-on-first-login-script _
> gexps)
> #~(begin
> (use-modules (guix i18n)
> (guix diagnostics))
> +
> + (define (claim-first-run file-name)
> + (catch #t
> + (lambda ()
> + ;; This incantation will raise an error if the
> file at
> + ;; flag-file-path already exists, and will create
> it otherwise.
> + (close (open file-name (logior O_CREAT O_EXCL)))
> + #t)
> + (lambda (e)
Whoops, just noticed this should be _, not (e). It still works,
because it crashes the script which stops the gexps from running,
but writes a message to the console. I'll send an updated patch
tomorrow.
next prev parent reply other threads:[~2023-10-09 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 11:59 [bug#66387] [PATCH] home: services: Fix race condition when detecting first login Carlo Zancanaro
2023-10-09 13:08 ` Carlo Zancanaro [this message]
2023-10-11 11:57 ` Carlo Zancanaro
2023-10-19 20:29 ` bug#66387: " Ludovic Courtès
2023-10-20 6:55 ` [bug#66387] " Andrew Tropin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkd8djri.fsf@zancanaro.id.au \
--to=carlo@zancanaro.id.au \
--cc=66387@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.