[bind10-dev] Handling Disappearing Terminals

Michal 'vorner' Vaner michal.vaner at nic.cz
Fri Mar 18 14:00:27 UTC 2011


Hello

On Fri, Mar 18, 2011 at 02:30:01PM +0100, Shane Kerr wrote:
> Results:
> 
> --[ 1: idle ]----------------------------------------------------------
>               Start/Close     Background/Logout    Background/Close
> normal          SIGHUP            nothing               SIGHUP
> su              nothing           nothing               nothing
> sudo          SIGHUP (3x)         nothing               SIGHUP
> 
> --[ 2: writing ]-------------------------------------------------------
>               Start/Close      Background/Logout   Background/Close
> normal   SIGHUP, SIGTSTP, err         err             SIGHUP, err
> su       err, SIGHUP, SIGTSTP         err                 err
> sudo     SIGHUP, SIGTSTP, err         err             SIGHUP, err
> 
> --[ 3: reading ]-------------------------------------------------------
>               Start/Close      Background/Logout   Background/Close
> normal        SIGHUP, EOF             EOF             SIGHUP, EOF
> su                EOF             SIGTTIN, EOF       SIGTTIN, EOF
> sudo          SIGHUP, err      SIGTTIN, SIGTSTP,      SIGHUP, EOF
>                              SIGTERM, SIGTSTP, EOF

Quite a mess, it seems.

> The problem becomes what we do with child processes. If we want them to
> write to the console, then they will get some sort of error too.
> 
>       * We could let the children die, and restart them, but this is...
>         inelegant.
>       * We could perhaps have the boss act as a proxy and use pipes to
>         read the output.
>       * We could do the same thing, but with pseudo-ttys. Python even
>         has a module for this:
>         http://docs.python.org/py3k/library/pty.html
>       * We could shut down.

We probably don't want to write to stdout/stderr directly, but trough the
logging library. It could then do the same as with boss and do any redirections
or so.

However, I think it would be quite confusing to close a terminal where the
bind10 runs and spams by messages, close the window and find out 10 hours later
that it's still happily running. If I run something and see it's output in a
window and I close the window, I usually want it to go away.

With regards

-- 
do { goto Water; } while( !tryBreakOffTheHandle() );

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20110318/3e6f4a23/attachment.bin>


More information about the bind10-dev mailing list