Certain scripts "hang" the terminal on logout
On Fri, Oct 24, 2008 at 11:48, Sean Carolan <email@example.com> wrote:
> # /etc/init.d/script restart << this runs fine, returns my shell prompt
> # exit << When I enter this command, my shell window just stays
> "stuck" and actually won't close down.
> Anyone know why this happens?
Yes, it's because the daemon started from that script keeps file
descriptors opened to the terminal you are connected to. This might be
considered a bug in the daemon, since a proper daemon should close all
its file descriptors before going background and returning to the
You might try to change the script in init.d to append "</dev/null
>/dev/null 2>&1" at the line that starts the daemon, this might force
it to detach itself from the terminal.
CentOS mailing list