Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750889AbWCQOce (ORCPT ); Fri, 17 Mar 2006 09:32:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751121AbWCQOcd (ORCPT ); Fri, 17 Mar 2006 09:32:33 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:55956 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S1750889AbWCQOcd (ORCPT ); Fri, 17 Mar 2006 09:32:33 -0500 Date: Fri, 17 Mar 2006 15:32:23 +0100 (MET) From: Jan Engelhardt To: Denis Vlasenko cc: Andreas Schwab , Stefan Seyfried , linux-kernel@vger.kernel.org, christiand59@web.de Subject: Re: /dev/stderr gets unlinked 8] In-Reply-To: <200603170834.27694.vda@ilport.com.ua> Message-ID: References: <200603141213.00077.vda@ilport.com.ua> <200603170834.27694.vda@ilport.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 33 >> >> any good daemon closes stdout, stderr, stdin >> > >> >A real good daemon would redirect them to /dev/null. >> >> and writes to /var/log/mysql/... > >And has log rotation. Apache has log rotation. Squid has log rotation. > >Why they all need to have log rotation code? I forced them all to just I dunno. SUSE Linux (no advertisement intended) uses a global solution - "logrotate" rather than using each project's own logrotation. >write log to stderr, and multilog from daemontools does the logging >(with rotation and postprocessing (for example, feeds Squid log into >Mysql db)) just fine. > >But we digress. Is there any magic (mount --bind?) to make >/dev/stderr undestructible? If not, you could write an LSM that prohibits unlinking /dev/stderr. Jan Engelhardt -- | Software Engineer and Linux/Unix Network Administrator - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/