Date: Tue, 21 Mar 2017 13:59:43 -0400 (EDT) From: "Igor R." <freebsd@str.komkon.org> To: freebsd-questions@freebsd.org Subject: Re: command line history broken in 11.0 Message-ID: <alpine.BSF.2.20.1703211310410.12389@tissa.komkon.org>
next in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1703211310410.12389>