bug-bash
[Top][All Lists]
Advanced

[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: Roman Rakus
Subject: Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history
Date: Tue, 08 Mar 2011 15:07:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7

On 03/08/2011 12:32 PM, Dr. Werner Fink wrote:
Something like the attached patch.

Seems it doesn't work. I have applied your patch, run that bash in gnome-terminal, close the terminal. In gdb I set a break to atexit() and maybe_save_shell_history() functions. Bash receives SIGHUP, I say continue, bash again receives SIGHUP, again continue and bash ends. gdb is saying: Program terminated with signal SIGHUP, Hangup.

In man page of atexit:
NOTES
Functions registered using atexit() (and on_exit(3)) are not called if
       a process terminates abnormally because of the delivery of a signal.

so I guess it won't work.

RR



reply via email to

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