Bash 4.3.11(1) crashes after running exec
Hello! OS: Kubuntu 14.04 Bash version: 4.3.11(1)-release (i686-pc-linux-gnu) How to reproduce a bug: (1) user@host:~$ exec man !!! (2) Then, on man execution, press q (3) On this stage, if bash didn't exited and there is a line on the screen: --Man-- next: man(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ] press Ctrl-C (4) if bash didn't crash, repeat steps (1)-(4), while looking, what happening to .bash_history file. After 2-3 times bash should crash on step (3) Regards, Michael
Re: Bash 4.3.11(1) crashes after running exec
Thank you for the answer. I would agree with you, but there is something more. If I change command from the first step to this: user@host:~$ exec man man man and leave other steps as were before, then bash crashes as well. Also on tty logins. Regards, Michael On 06/27/2016 05:40 PM, Chet Ramey wrote: > On 6/26/16 4:55 PM, #pragma wrote: >> Hello! >> >> OS: Kubuntu 14.04 >> Bash version: 4.3.11(1)-release (i686-pc-linux-gnu) >> >> How to reproduce a bug: >> >> (1) >> user@host:~$ exec man !!! > > What do you expect to happen? You're replacing the bash process with > man against a totally bizarre set of arguments generated by history > expansion. >
Re: Bash 4.3.11(1) crashes after running exec
> Again, what do you expect to happen? You replace the bash process -- it > goes away. As soon as the man process terminates, your session ends. This > is what `exec' does. > Thank you. You are right, it was just confusing to see on the screen of Konsole terminal that "bash program was crashed". So bash not doing fork() before exec? It looks like a father process crashes. Crash is always undesired and unexpected behaviour, that's why I wrote. But may be it is some problem with exec family functions. Regards, Michael