On Mon, Jun 27, 2016 at 08:25:06PM +0300, #pragma wrote: > 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.
It's not a "problem". It's what exec is designed to do. It replaces the bash process with some other program. The child of the terminal, which was formerly bash, is now "man". When man exits, the terminal should also exit. Except that apparently you have some unusual terminal that doesn't simply exit when its child exits. So you're seeing some weird internal thing specific to your terminal.