[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

If $HISTFILE is set to /dev/null and you execute more commands than $HIS

From: crocket
Subject: If $HISTFILE is set to /dev/null and you execute more commands than $HISTFILESIZE, /dev/null is deleted.
Date: Fri, 30 Jan 2015 16:32:30 +0900

It turns out that tramp on emacs 24.4 sets $HISTFILE to /dev/null and
makes bash delete /dev/null when I kill emacs.

When /dev/null is not a character device but a regular file, a lot of
programs freeze.

I think a program should deal with weird inputs gracefully especially
when it's not obvious that some program could set HISTFILE to
/dev/null and that bash could delete /dev/null if HISTFILE is

I didn't know until today that bash deletes /dev/null if HISTFILE is
set to /dev/null.

While emacs needs some modifications, bash also needs to handle that
scenario more gracefully because other programs can also set HISTFILE
to /dev/null instead of unsetting HISTFILE and setting HISTFILESIZE to

reply via email to

[Prev in Thread] Current Thread [Next in Thread]