GNU bug report logs - #36282
shepherd appears to delete log-file instead of appending

Previous Next

Package: guix;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Tue, 18 Jun 2019 15:51:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Vollmert <rob <at> vllmrt.net>
To: 36282 <at> debbugs.gnu.org
Subject: bug#36282: shepherd appears to delete log-file instead of appending
Date: Tue, 18 Jun 2019 17:49:46 +0200
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





This bug report was last modified 5 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.