[Top][All Lists]

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

Re: [bash-bug] no local bash_history created or written to if existing

From: Dr. Werner Fink
Subject: Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history
Date: Tue, 8 Mar 2011 12:32:54 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Mar 08, 2011 at 11:29:22AM +0100, Werner Fink wrote:
> On Mon, Mar 07, 2011 at 10:22:55PM -0500, Chet Ramey wrote:
> > 
> > One thing that has changed is that an interactive shell will no longer
> > attempt to write the history file if it's killed by a signal, since that
> > causes many functions to be executed that are not safe to call from a
> > signal handler.  If you're in the habit of trying to exit the shell by
> > closing the terminal window, which causes the shell to be killed by SIGHUP
> > (I think, maybe SIGTERM), the history will not be saved.
> That will cause a lot of bugreports.  Just a question: could an atexit()
> handler an option or an other way the bash could make use use an extra
> (sig)longjmp()/(sig)setjmp() after increasing an atomic control variable
> in the signal handlers for SIGHUP/SIGTERM to run all things done short
> before exit.

Something like the attached patch.


  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

Attachment: bash-4.2-history.dif
Description: Text Data

reply via email to

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