From: "Ludovic Courtès" <ludo@gnu.org>
To: Robert Vollmert <rob@vllmrt.net>
Cc: 36282-done@debbugs.gnu.org
Subject: bug#36282: shepherd appears to delete log-file instead of appending
Date: Fri, 21 Jun 2019 17:13:08 +0200 [thread overview]
Message-ID: <87k1dfgeez.fsf@gnu.org> (raw)
In-Reply-To: <7588E79A-ADB2-446D-8AD3-F6EEFCBE97F5@vllmrt.net> (Robert Vollmert's message of "Tue, 18 Jun 2019 17:49:46 +0200")
Hi,
Robert Vollmert <rob@vllmrt.net> skribis:
> This is from reading the shepherd code, not verified by test currently.
> Apologies if I’m missing something.
>
> The documentation claims that log-file is appended to:
>
> When @var{log-file} is true, it names the file to which the service's
> standard output and standard error are redirected. @var{log-file} is
> created if it does not exist, otherwise it is appended to.
>
> However, in modules/shepherd/service.scm:
>
> 889 (define make-forkexec-constructor
> […]
> 923 (lambda args
> 924 (define (clean-up file)
> 925 (when file
> 926 (catch 'system-error
> 927 (lambda ()
> 928 (delete-file file))
> 929 (lambda args
> 930 (unless (= ENOENT (system-error-errno args))
> 931 (apply throw args))))))
> 932
> 933 (clean-up pid-file)
> 934 (clean-up log-file)
Ouch, indeed. Commit 7b4c88bac70f0bad82ef70fd5b682a49bc227478 tried to
address that, but I think it pretty much failed at that…
I removed this ‘clean-up’ call in Shepherd commit
6892f638c78a14fedd075f664432757bc015c140.
Thanks,
Ludo’.
prev parent reply other threads:[~2019-06-21 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 15:49 bug#36282: shepherd appears to delete log-file instead of appending Robert Vollmert
2019-06-21 15:13 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1dfgeez.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=36282-done@debbugs.gnu.org \
--cc=rob@vllmrt.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).