emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#36282: closed (shepherd appears to delete log-file


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#36282: closed (shepherd appears to delete log-file instead of appending)
Date: Fri, 21 Jun 2019 15:14:02 +0000

Your message dated Fri, 21 Jun 2019 17:13:08 +0200
with message-id <address@hidden>
and subject line Re: bug#36282: shepherd appears to delete log-file instead of 
appending
has caused the debbugs.gnu.org bug report #36282,
regarding shepherd appears to delete log-file instead of appending
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
36282: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36282
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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




--- End Message ---
--- Begin Message --- Subject: Re: bug#36282: shepherd appears to delete log-file instead of appending Date: Fri, 21 Jun 2019 17:13:08 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
Hi,

Robert Vollmert <address@hidden> 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’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]