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: 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[3]: wait skips signals but first one

2024-02-04 Thread Mykyta Dorokhin
I've just tried the same with 5.1.16 andit also fixes the problem. diff --git a/trap.c b/trap.c index 1b27fb3..65e8f66 100644 --- a/trap.c +++ b/trap.c @@ -526,7 +526,7 @@ trap_handler (sig)       if (this_shell_builtin && (this_shell_builtin == wait_builtin))  {    wait_signal_received = sig; - 

Re[2]: wait skips signals but first one

2024-02-03 Thread Mykyta Dorokhin
Hello, Again, I'm on ("commit bash-20200221 snapshot") commit, the one I  think breaks things: https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=0df4ddca3f371bc258fe4185cdec36fce3e7be7b There is a line in trap.c with your change. If I revert it then everything works again: - if (i

Re: wait skips signals but first one

2024-02-03 Thread Chet Ramey
On 2/3/24 10:28 AM, Mykyta Dorokhin wrote: Analysis with strace. After receiving SIGUSR1, Debian only blocks SIGCHLD, then clears the block: 205295 --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=205327, si_uid=1040} --- 205295 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 205295 rt_si

Re: wait skips signals but first one

2024-02-03 Thread Chet Ramey
On 2/3/24 10:00 AM, Mykyta Dorokhin wrote: I have found the commit on devel branch which breaks things for me (and probably other Yocto-based builds): This one still works == commit 89d788fb0152724a93e0fdab8c15116e5c76572b Author: Chet Ramey Date:   Mon Feb 17 11:41:35 20

Re[2]: wait skips signals but first one

2024-02-03 Thread Mykyta Dorokhin
Hello again, Here is another analysis that my collegue made on the issue: Bash Compiled for wrong OS? Analysis with strace. After receiving SIGUSR1, Debian only blocks SIGCHLD, then clears the block: 205295 --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=205327, si_uid=1040} --- 205

Re[2]: wait skips signals but first one

2024-02-03 Thread Mykyta Dorokhin
Like you, I can't reproduce it on the desktop platforms I have available right now. The bash devel git branch has fairly fine granularity. If you can automate the signal sending somewhat, maybe by having a child process send signals to $$, you could use your script and `git bisect' to find the c

Re: wait skips signals but first one

2024-01-08 Thread Chet Ramey
On 1/5/24 2:46 PM, Mykyta Dorokhin wrote: Bash Version: 5.1 Patch Level: 16 Release Status: release Description: I'm working on a custom project within the Yocto framework. After a recent build system update, the bash version updated to 5.1.16. Subsequently, I've noticed peculiar side effect

wait skips signals but first one

2024-01-05 Thread Mykyta Dorokhin
From: ki...@ukr.net To: bug-bash@gnu.org Subject: wait skips signals but first one Configuration Information [Automatically generated, do not change]: Machine: arm OS: linux-gnueabi Compiler: arm-mydistro-linux-gnueabi-gcc  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 Compilation CFLAGS