[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: doc: Recommend avoiding execl, execle or execlp i
From: |
guix-commits |
Subject: |
branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications. |
Date: |
Mon, 28 Nov 2022 23:07:03 -0500 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 3578fb1323 doc: Recommend avoiding execl, execle or execlp in mcron
job specifications.
3578fb1323 is described below
commit 3578fb1323db3f0eadd5749e51095e5f196d78c7
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Nov 28 22:47:16 2022 -0500
doc: Recommend avoiding execl, execle or execlp in mcron job specifications.
* doc/guix.texi (Scheduled Job Execution): Adjust the 'updatedb' example and
add a new tip.
---
doc/guix.texi | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
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
+
For more complex jobs defined in Scheme where you need control over the top
level, for instance to introduce a @code{use-modules} form, you can move your
code to a separate program using the @code{program-file} procedure of the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications.,
guix-commits <=