all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications.
Date: Fri, 02 Dec 2022 10:32:22 +0100	[thread overview]
Message-ID: <87fsdyup5l.fsf@gnu.org> (raw)
In-Reply-To: <166969482303.24641.999754855039128907@vcs2.savannah.gnu.org> (guix-commits@gnu.org's message of "Mon, 28 Nov 2022 23:07:03 -0500")

Hello,

guix-commits@gnu.org skribis:

> diff --git a/doc/guix.texi b/doc/guix.texi
> index e547d469f4..caa6976a82 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -18940,9 +18940,8 @@ gexps to introduce job definitions that are passed to mcron
>    ;; job's action as a Scheme procedure.
>    #~(job '(next-hour '(3))
>           (lambda ()
> -           (execl (string-append #$findutils "/bin/updatedb")
> -                  "updatedb"
> -                  "--prunepaths=/tmp /var/tmp /gnu/store"))
> +           (system* (string-append #$findutils "/bin/updatedb")
> +                    "--prunepaths=/tmp /var/tmp /gnu/store"))
>           "updatedb"))
>  
>  (define garbage-collector-job
> @@ -18980,6 +18979,12 @@ the job would appear as ``Lambda function'' in the output of
>  @command{herd schedule mcron}, which is not nearly descriptive enough!
>  @end quotation
>  
> +@quotation Tip
> +Avoid calling the Guile procedures @code{execl}, @code{execle} or
> +@code{execlp} inside a job specification, else mcron won't be able to
> +output the completion status of the job.
> +@end quotation

The problem is that this creates an additional process and the first one
now just sits there in ‘waitpid’.

Could mcron return the completion status of the process that calls the
thunk?  It suppose it’s already monitoring it (via SIGCHLD or a direct
‘waitpid’ call) so it should have that info available, no?

I hope this makes sense.

Ludo’.


       reply	other threads:[~2022-12-02  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166969482303.24641.999754855039128907@vcs2.savannah.gnu.org>
2022-12-02  9:32 ` Ludovic Courtès [this message]
2022-12-04  5:10   ` branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications Maxim Cournoyer

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=87fsdyup5l.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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.