[Pkg-mc-devel] Bug#498123: Bug#498123: closed by Patrick Winnertz <winnie at debian.org> (cmdline history of parallel sessions)

Baurzhan Ismagulov ibr at radix50.net
Wed Sep 24 21:14:24 UTC 2008

Hello Michelle,

On Mon, Sep 22, 2008 at 03:58:41PM +0200, Michelle Konzack wrote:
> BaSH does not lock the file, but it read it into the memory  and  append
> new things there if you now leave the bash, it is  writen  back  to  the
> bash_history file.
> If you realy war parallel writes from bash, you have to write a function
> and put it into your .bash_login which WRITE  out  the  bash_history  in
> intervals and APPEND the contents.
> Please read "man bash" hot to do  this.  The  appropriated  command  are
> availlable...
> and of course, the function has to be executed at BaSH startup  and  put
> into the bachground WITHOUT DISOWNing the process.

This is certainly interesting. I suppose you mean history -w and history
-a, don't you? But if bash doesn't lock the file, I still don't see how
this can be "mathematically" correct: If history -a reads the file into
the memory and writes the new one instead, another session could still
corrupt the file. Could you please elaborate?

Thanks in advance,
Baurzhan Ismagulov

More information about the Pkg-mc-devel mailing list