unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Vollmert <rob@vllmrt.net>
To: 36282@debbugs.gnu.org
Subject: bug#36282: shepherd appears to delete log-file instead of appending
Date: Tue, 18 Jun 2019 17:49:46 +0200	[thread overview]
Message-ID: <7588E79A-ADB2-446D-8AD3-F6EEFCBE97F5@vllmrt.net> (raw)

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)
   935  
   936            (let ((pid (fork+exec-command command

             reply	other threads:[~2019-06-18 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 15:49 Robert Vollmert [this message]
2019-06-21 15:13 ` bug#36282: shepherd appears to delete log-file instead of appending Ludovic Courtès

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=7588E79A-ADB2-446D-8AD3-F6EEFCBE97F5@vllmrt.net \
    --to=rob@vllmrt.net \
    --cc=36282@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 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).