From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Vollmert Subject: bug#36282: shepherd appears to delete log-file instead of appending Date: Tue, 18 Jun 2019 17:49:46 +0200 Message-ID: <7588E79A-ADB2-446D-8AD3-F6EEFCBE97F5@vllmrt.net> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38549) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdGO2-0005LK-5h for bug-guix@gnu.org; Tue, 18 Jun 2019 11:51:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdGNz-0006he-IP for bug-guix@gnu.org; Tue, 18 Jun 2019 11:51:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdGNy-0006du-A8 for bug-guix@gnu.org; Tue, 18 Jun 2019 11:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hdGNy-0003m8-6V for bug-guix@gnu.org; Tue, 18 Jun 2019 11:51:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:38417) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdGNi-0005Cu-Sr for bug-guix@gnu.org; Tue, 18 Jun 2019 11:50:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdGNc-0005xI-6o for bug-guix@gnu.org; Tue, 18 Jun 2019 11:50:44 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:31240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdGNZ-0004Qd-M0 for bug-guix@gnu.org; Tue, 18 Jun 2019 11:50:39 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id EE98E4FF64 for ; Tue, 18 Jun 2019 17:49:47 +0200 (CEST) Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id OD1oF3bS6f2V for ; Tue, 18 Jun 2019 17:49:46 +0200 (CEST) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 36282@debbugs.gnu.org This is from reading the shepherd code, not verified by test currently. Apologies if I=E2=80=99m 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 [=E2=80=A6] 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 (=3D ENOENT (system-error-errno args)) 931 (apply throw args)))))) 932 =20 933 (clean-up pid-file) 934 (clean-up log-file) 935 =20 936 (let ((pid (fork+exec-command command