From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DMARC_MISSING, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from smtp.noos.fr (zola.noos.net [212.198.2.76]) by chiba.3jane.net (Postfix) with ESMTP id DDD15201607C for ; Thu, 21 Mar 2002 14:38:11 -0600 (CST) Received: (qmail 21734712 invoked by uid 0); 21 Mar 2002 20:34:15 -0000 Received: from unknown (HELO slow-dual) ([212.198.88.236]) (envelope-sender ) by 212.198.2.76 (qmail-ldap-1.03) with SMTP for ; 21 Mar 2002 20:34:15 -0000 From: "Christian HOFFMANN" To: Matthew Dillon , gentoo-dev@gentoo.org Date: Thu, 21 Mar 2002 21:34:15 +0100 MIME-Version: 1.0 Subject: Re: [gentoo-dev] Re: [BUG and PATCH] Does dcron need a space at the end of each Message-ID: <3C9A51D7.13213.459829@localhost> Priority: normal In-reply-to: <200203210212.g2L2Cxw87510@apollo.backplane.com> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 2d8262e4-dedd-49c0-9502-9a330ce4f7d5 X-Archives-Hash: 91302778cccd56f09ca1113444b4b426 I tested your proposed modification, it works far better than mine. I was just wrong in the beginning, my problem was lines starting with a space (for allignment purpose) and my patch break the others tasks on lines not starting with a space. Now dcron work for lines starting or not with a space or tabs or... For your information dcron2.7 is the standard cron for the Gentoo Linux distribution. http://www.gentoo.org > > :I just fired gdb to find the source of this problem and found the source > :of the problem being at line 178 of database.c > : > :was: buf[strlen(ptr)-1] = 0; > :is now on my system: buf[strlen(ptr)] = 0; > : > :This line was chopping 2 char at the end of the line the last one of the > :command and the newline. You have to remove one char but indexing > :starts at 0 and strlen give the number of char. > : > :I'm new to patch submission, howto ? > : > :Regards > > Well, I do not know who is maintaining the linux version of dcron. > I maintain my master source but I don't think the linux sites are > picking it up. > > In regards to this bug, I think the problem is that it should be > 'ptr[strlen(ptr)-1] = 0' rather then 'buf[strlen(ptr)-1] = 0'. > That is, it is trying to remove the newline at the end of the > buffer. The bug occurs if you have spaces at the front of the line. > > Please try 'ptr[strlen(ptr)-1] = 0' and see if that solves your > problem. > > -Matt > > _______________________________________________ > gentoo-dev mailing list > gentoo-dev@gentoo.org > http://lists.gentoo.org/mailman/listinfo/gentoo-dev > ----------------------------------------------- Christian HOFFMANN