From owner-freebsd-hackers@FreeBSD.ORG Wed May 19 21:39:04 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36EF1065673 for ; Wed, 19 May 2010 21:39:04 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB5C8FC14 for ; Wed, 19 May 2010 21:39:01 +0000 (UTC) Received: by fxm4 with SMTP id 4so1661943fxm.13 for ; Wed, 19 May 2010 14:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=16fCMuwmkKEgZ5E2dYlWMCd4qJJsviWb7Jkyy1b3WDc=; b=m2tB6cZl2Gvl2vFwHszW7tf9COY5S6QQCjuHIVRXUPEpra0ajCBiGH9KKk3Ik2vcRi kmLB3Z5204rLpDJ6I/bjIg5fb7vvKTQQiUABSgK2xXLCsBpGEWpgbBIwA3B0B3vBRGQl G7kEzk3BHNkrG96hJyW5IszSaYG5YIexM8pqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=S2jfd7mNWfz6FSxM4+AAVohCd5XYjKGpp6+KceozVR71kv0sobsfTKQFEI/D6jsexS zd6qHsfpLjxpI44YHgYSmn7BWfDnqTrY+fGogr1RanYxrsNQKsGvPKExRYYC5mjjHs/d ZlKqkwth+ZSI1dEYeioyj7F5bZ1UyOO2OUnUA= Received: by 10.223.16.84 with SMTP id n20mr1545566faa.94.1274305140850; Wed, 19 May 2010 14:39:00 -0700 (PDT) Received: from [157.181.97.113] (quark.teteny.elte.hu [157.181.97.113]) by mx.google.com with ESMTPS id r12sm478248fah.20.2010.05.19.14.38.59 (version=SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 14:39:00 -0700 (PDT) Message-ID: <4BF45A9D.4030806@gmail.com> Date: Wed, 19 May 2010 23:39:41 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4 MIME-Version: 1.0 To: Doug Barton References: <4BF43774.4060303@gmail.com> <4BF440CC.1000007@FreeBSD.org> In-Reply-To: <4BF440CC.1000007@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Lucius Windschuh , freebsd-hackers@freebsd.org Subject: Re: boot process gets weirdly interrupted when using scroll lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 21:39:04 -0000 Doug Barton wrote: > On 05/19/10 12:09, deeptech71@gmail.com wrote: >> [Topic moved away from freebsd-current as the problem doesn't seem to be >> -CURRENT-specific, and I think there's a larger crowd here :).] >> >> This may give a hint. The following patch resolves the 60-second idling >> issue. >> --- bgfuck 2010-05-19 20:23:50.000000000 +0200 >> +++ bgfsck 2010-05-19 20:23:40.000000000 +0200 >> @@ -34,7 +34,7 @@ >> check_startmsgs && echo "${bgfsck_msg}." >> fi >> >> - (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ >> + (sleep 1; > > You can accomplish the same thing by simply setting that variable to 1 > in /etc/rc.conf. > >> nice -4 fsck -B -p) 2>&1 | \ >> logger -p daemon.notice -t fsck & >> } >> >> So sleep is foregrounded or something? > > I missed the original thread, sorry, but looking at the current state of > the code it's unclear to me why the close-paren is located where it is. Archived at http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016562.html, but let me rephrase it. > Can you try the attached patch and let us know if it works for you? Didn't work. > > > Doug > So the problem is: During the boot process, when the rc scripts are printing messages (for example "Creating and/or trimming log files"), if I turn on the scroll lock, then (1) the messages are not printed and are permanently lost, and (2) the system waits for backgrounded (shell script) sleep calls to end before proceeding. Here's a test case. Insert the following text into /etc/rc.d/bgfsck: echo TURN ON THE SCROLL LOCK NOW sleep 4 echo HI THERE sleep 30 & echo HI THERE During boot, when you see the "TURN ON THE SCROLL LOCK NOW" message, turn on the scroll lock. Wait for 5 seconds, then turn off the scroll lock. Confirm that the script sleeps for another ~30 seconds, and that neither "HI THERE" message are ever printed.