[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.1
From: |
Chet Ramey |
Subject: |
Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53 |
Date: |
Thu, 06 Nov 2014 09:15:48 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 11/6/14, 5:19 AM, Piotr Grzybowski wrote:
> 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
You could use mmap, but the synchronization between different shells
writing to the same mmaped segment is a problem that has to be solved.
> 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
There is no "standard ipc" except pipes across the range of systems bash
runs on.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, (continued)
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Graham Jones, 2014/11/04
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/04
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Chet Ramey, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Graham Jones, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Graham Jones, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Chet Ramey, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/06
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Greg Wooledge, 2014/11/06
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53,
Chet Ramey <=
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/07
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Eric Blake, 2014/11/07
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/07
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Graham Jones, 2014/11/07
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/07
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Chet Ramey, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Graham Jones, 2014/11/05
- Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53, Piotr Grzybowski, 2014/11/06