From owner-freebsd-stable@FreeBSD.ORG Thu May 15 17:39:38 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5501065677 for ; Thu, 15 May 2008 17:39:38 +0000 (UTC) (envelope-from petefrench@ticketswitch.com) Received: from angel.ticketswitch.com (angel.ticketswitch.com [IPv6:2002:57e0:1d4e::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7A48FC19 for ; Thu, 15 May 2008 17:39:38 +0000 (UTC) (envelope-from petefrench@ticketswitch.com) Received: from [10.50.50.2] (helo=smaug.rattatosk) by angel.ticketswitch.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JwhQW-0007YX-So for stable@freebsd.org; Thu, 15 May 2008 18:39:36 +0100 Received: from dilbert.rattatosk ([10.50.50.6] helo=dilbert.ticketswitch.com) by smaug.rattatosk with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JwhQW-0003h5-JA for stable@freebsd.org; Thu, 15 May 2008 18:39:36 +0100 Received: from petefrench by dilbert.ticketswitch.com with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JwhQW-000L1H-IE for stable@freebsd.org; Thu, 15 May 2008 18:39:36 +0100 To: stable@freebsd.org Message-Id: From: Pete French Date: Thu, 15 May 2008 18:39:36 +0100 Cc: Subject: cron hanging on to child processes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2008 17:39:38 -0000 I have a process which is run daily from cron that stops mysql, does some stuff, and starts it again. The scriput outputs a number of lines which are emailed to me in the output of the cron job. What I have noticed is that my emials actually lag by a day - it turns out that the cron job appears to not send the email until mysql is sut down the following day. I can only assume that when mysql is restarted, cron sees it as a child process, and thus does not terminate until that process does. Which happens when a new cron job shuts it down again 24 hours later. Any suggestions on fixing this ? I wouldn't have thought that stopping and starting a daemon was a particularly unusual thing to want to do from a cron job. -pete.