command line history broken in 11.0

Igor R. freebsd at
Tue Mar 21 17:59:47 UTC 2017

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.


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 
Just before 10.3 release, this change was introduced to /bin/csh:
and then quickly reversed. by 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:

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.

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?

More information about the freebsd-questions mailing list