[CentOS] Certain scripts "hang" the terminal on logout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

On Fri, Oct 24, 2008 at 11:48, Sean Carolan <scarolan@xxxxxxxxx> 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
shell.

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.

HTH,
Filipe

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux