Re: Slow history load with some values of HISTSIZE

2024-02-05 Thread Casey Johnson
That is more or less how I happened upon this behavior. I have been using bash for 20+ years and for most of that time I have had HISTSIZE and HISTFILESIZE large enough to be effectively unlimited. I recently took the time to learn the difference between HISTSIZE and HISTFILESIZE. I liked the id

Re: Slow history load with some values of HISTSIZE

2024-02-05 Thread alex xmb sw ratchev
there is also a possible value of -1 , for unlimited i had once a ~3mb or ~7mb file cause some bug .. and it took ( too ) long to load greets On Tue, Feb 6, 2024, 05:07 Casey Johnson wrote: > That is more or less how I happened upon this behavior. I have been using > bash for 20+ years and for

[PATCH] use unlocked stdio functions

2024-02-05 Thread Grisha Levit
Bash makes many calls to stdio functions that may have unlocked_stdio(3) equivalents. Since the locking functionality provided by the regular versions is only useful in multi-threaded applications, it probably makes sense for Bash to use the *_unlocked versions where available. E.g. in situations

Re: [PATCH] printf: more error handling

2024-02-05 Thread Grisha Levit
On Sat, Feb 3, 2024 at 1:05 PM Chet Ramey wrote: > > On 2/2/24 6:33 PM, Grisha Levit wrote: > > Is it necessary to check the error indicator if printf(3) just had a non- > > negative return? > > I think printf is allowed to set the error flag that ferror checks even if > it returns 0, but I could

Re: Slow history load with some values of HISTSIZE

2024-02-05 Thread alex xmb sw ratchev
On Mon, Feb 5, 2024, 18:09 Dale R. Worley wrote: > Casey Johnson writes: > > In a clean shell, execute: > > HISTFILE=alt-history.txt > > HISTSIZE=15 > > history -r > > and then observe how long the last command runs before returning. > > Though I e

Re: wait skips signals but first one

2024-02-05 Thread Chet Ramey
On 2/5/24 12:22 PM, Mykyta Dorokhin wrote: Note 1: forgot to mention that I'm cross-compiling. Note 2: it probably makes sense to add a warning or something that states that HAVE_POSIX_SIGSETJMP disabled due to cross-compiling. The autoconf macro that tests for this (BASH_FUNC_POSIX_SETJMP) p

Re[2]: wait skips signals but first one

2024-02-05 Thread Mykyta Dorokhin
Hello again, configure log says: checking if getcwd() will dynamically allocate memory with 0 size... (cached) yes checking for presence of POSIX-style sigsetjmp/siglongjmp... (cached) missing checking whether or not strcoll and strcmp differ... (cached) no This is most likelly the problem. No

Re: Slow history load with some values of HISTSIZE

2024-02-05 Thread Dale R. Worley
Casey Johnson writes: > In a clean shell, execute: > HISTFILE=alt-history.txt > HISTSIZE=15 > history -r > and then observe how long the last command runs before returning. Though I expect that when you exit bash, the history file gets trimmed to 15

Re: [PATCH 01/18] doc/bash.1: fix rendering error on old *roffs

2024-02-05 Thread Chet Ramey
On 1/31/24 3:40 AM, G. Branden Robinson wrote: The man(7) in Seventh Edition Unix (1979) accepted at most six arguments to any macro. Documenter's Workbench 3.3 troff retains this limitation, as do at least some System V troffs that survive in commercial Unix (such as Solaris 10 troff). Thanks

Re: wait skips signals but first one

2024-02-05 Thread Chet Ramey
On 2/3/24 7:01 PM, Mykyta Dorokhin wrote: There is a line in trap.c with your change. If I revert it then everything works again: - if (interrupt_immediately && wait_intr_flag) + if (/* interrupt_immediately && */wait_intr_flag) So if I put interrupt_immediately back and rebuild the code with

Re: glob-expand-word and vi-command mode

2024-02-05 Thread Chet Ramey
On 2/3/24 6:23 PM, Mike Jonkmans wrote: esc * is bound to insert-completions It's bound to vi-complete, which bash replaces with something that does the pathname expansion that POSIX requires. How can I find this out? You can assume that the bash vi mode behaves as POSIX specifies: https: