From owner-freebsd-questions@freebsd.org Tue Mar 21 17:59:47 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337DAD16C2E for ; Tue, 21 Mar 2017 17:59:47 +0000 (UTC) (envelope-from freebsd@str.komkon.org) Received: from tissa.komkon.org (tissa.komkon.org [52.5.170.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "komkon.org", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D9897D6D for ; Tue, 21 Mar 2017 17:59:46 +0000 (UTC) (envelope-from freebsd@str.komkon.org) Received: from auth (localhost [127.0.0.1]) by tissa.komkon.org (8.15.2/8.15.2) with ESMTPSA id v2LHxh83019469 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 21 Mar 2017 13:59:44 -0400 (EDT) (envelope-from freebsd@str.komkon.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=str.komkon.org; s=mail; t=1490119184; bh=Lxyp1sW5rG4BC1gIuzPTmygH9tP6qU0vGrWoKN7QPzg=; h=Date:From:To:Subject; b=cBBJot1G6BxNE1q31j4jBUVY7SbJrH00hvXdpDa8EyHoQEEXgQ+mBHAMlerM3Fl61 EssfsLjXG8YQl880m4KC5pNLHofln1JjgPphHGp7r/J08bUIYBWDTdMQTtHTN5R+/y 0wF+1iyaQkXM28s5Oh3tczo8V3iu+obRFVEla1y0= Date: Tue, 21 Mar 2017 13:59:43 -0400 (EDT) From: "Igor R." To: freebsd-questions@freebsd.org Subject: Re: command line history broken in 11.0 Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Virus-Scanned: clamav-milter 0.99.2 at tissa.komkon.org X-Virus-Status: Clean X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 17:59:47 -0000 It is not something that I've tried to do, but here is an idea: "reboot & ; exit". The rational is that by doing this you would detach the standard output of the "reboot" process, and that will allow the exit to complete. If that doesn't help, you can think about redirecting the stdout (and as the next step, - stderr) in that command. HTH! PS. I just looked at the source code, and I suspect that the difference in the behavior in 10.3 and 11.0 (or 11.0.1) might be related to these changes: Just before 10.3 release, this change was introduced to /bin/csh: https://svnweb.freebsd.org/base?view=revision&revision=296976 and then quickly reversed. by Revision 297204. https://svnweb.freebsd.org/base?view=revision&revision=297204 You can see that revision 296976 had weird side effects: "causes strange effects like for example SIGTERM not being delivered to rc(8) scripts on shutdown albeit these use sh(1), if csh(1) or tcsh(1) are used as login shell of root." At the same time, soon after 10.3-release was split from HEAD, that change was reversed in HEAD as well, but in addition to that (Revision 297672) a different call (fork) was introduced: https://svnweb.freebsd.org/base?view=revision&revision=297673 https://svnweb.freebsd.org/base/head/bin/csh/config_p.h?r1=297673&r2=297672&pathrev=297673 Maybe that change also had some side effects (like what you see), but just less severe or less noticeable, - so it "worked" for 11.0*-release. Assuming my guess is correct, I'd recommend you filing a bug report (pr), so that it is documented - and that can bring it to the attention of the core team. https://bugs.freebsd.org/bugzilla/enter_bug.cgi On Mon, 20 Mar 2017 14:05-0400, Ernie Luzar wrote: > On 10.3 I had the current session saving the command line history when issuing > the shutdown, halt, and reboot command by using these alias commands that I > added to the .cshrc file of my logged in user account. > > alias sd "exit && shutdown now" > alias sdp "exit && shutdown -p now" > alias rboot "exit && reboot" > alias stop "exit && halt" > > Now after doing a clean install of 11.0 and using the same .cshrc file the > rboot and stop alias commands no longer save the current history. They act > like the exit command is not getting executed. The sd and sdp alias commands > are working as expected. > > When existing from a session terminal by issuing the exit command does still > save the current history. > > Is there an alternate method I can use?