How do I execute savehist for tcsh history if my machine froze?

1

My MacBook Air froze all of a sudden: the keyboard, trackpad and display are all unresponsive. However, ssh works.

I have one tcsh session active. Which signal do I send to tcsh for it to gracefully quit, saving history prior to quitting?

My tcsh does have all appropriate savehist already setup, i.e. if I were to type in exit, all history would be saved. Perhaps there is even some way for a superuser to steal the terminal, and actually pass in the characters exit\n as if they were typed in on the virtual terminal by the logged-in user?

cnst

Posted 2013-08-05T16:36:03.850

Reputation: 1 857

Answers

0

I tried doing sudo shutdown -r +1, then exit, through tcsh on ssh, and it seems to have worked. The system didn't reboot (probably because it was already frozen) and continued responding for ping6 as if it was still online, but ssh did stop working, and it would seem like tcsh within Terminal was quit out nicely, too.

After waiting for the userland shutdown to complete, I had to press and hold the power button for 5 seconds to actually reboot.

I'm not sure if the same result would have been achieved had I have skipped shutdown(8).

cnst

Posted 2013-08-05T16:36:03.850

Reputation: 1 857