Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.1
From:
Piotr Grzybowski
Subject:
Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53
Date:
Thu, 6 Nov 2014 11:19:55 +0100
On Thu, Nov 6, 2014 at 3:28 AM, Chet Ramey <chet.ramey@case.edu> wrote:
>
> In theory, one could change the functions in history.c and histfile.c to
> change the in-memory history list to one that uses a file, possibly with
> mmap().
> I'd be happy to look at contributed code to do this [..]
would you accept a solution like this:
1. all running instances of bash with history support on, share
history via shmem segment (some care as to its size should be taken)
2. $HISTFILE in every bash points to history file where every bash
writes history in chronological (depending on settings) order
3. $HISTFILE is only read on startup, if there are no other bash
instances running
4. sharing of history and synchronisation between instances is
realised via standard ipc
I have no idea how zsh does it, maybe it should be checked first.
cheers,
pg