shell-write-history-on-exit
shell-write-history-on-exit is a compiled Lisp function in `shell.el
'.
(shell-write-history-on-exit PROCESS EVENT)
Called when the shell process is stopped.
Writes the input history to a history file
`comint-input-ring-file-name' using `comint-write-input-ring'
and inserts a short message in the shell buffer.
This function is a sentinel watching the shell interpreter process.
Sentinels will always get the two parameters PROCESS and EVENT.