Print this page
OS-4136 would like SIGUSR to zlogin to switch in and out of '-N' modes
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
OS-4109 'zlogin -I' should close /dev/zfd/0 when it exits
OS-3524 in order to support interaction with docker containers, need to be able to connect to stdio for init from GZ
OS-3525 in order to support 'docker logs' need to be able to get stdio from zone to log file
OS-3529 would like zlogin -i
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/zlogin.1.man.txt
          +++ new/usr/src/man/man1/zlogin.1.man.txt
   1    1  ZLOGIN(1)                        User Commands                       ZLOGIN(1)
   2    2  
   3    3  
   4    4  
   5    5  NAME
   6    6         zlogin - enter a zone
   7    7  
   8    8  SYNOPSIS
   9      -       zlogin [-dCEQ] [-e c] [-l username] zonename
        9 +       zlogin [-dCEINQ] [-e c] [-l username] zonename
  10   10  
  11   11  
  12      -       zlogin [-nEQS] [-e c] [-l username] zonename utility
       12 +       zlogin [-inEQS] [-e c] [-l username] zonename utility
  13   13              [argument]...
  14   14  
  15   15  
  16   16  DESCRIPTION
  17   17         The zlogin utility is used by the administrator to enter an operating
  18   18         system zone. Only a superuser operating in the global system zone can
  19   19         use this utility.
  20   20  
  21   21  
  22      -       zlogin operates in one of three modes:
       22 +       zlogin operates in one of four modes:
  23   23  
  24   24         Interactive Mode
  25      -                               If no utility argument is given and the stdin
  26      -                               file descriptor for the zlogin process is a tty
       25 +                               If no utility argument is given or if the -i
       26 +                               option is specified, and the stdin file
       27 +                               descriptor for the zlogin process is a tty
  27   28                                 device, zlogin operates in interactive mode. In
  28   29                                 this mode, zlogin creates a new pseudo terminal
  29   30                                 for use within the login session. Programs
  30   31                                 requiring a tty device, for example, vi(1),
  31   32                                 work properly in this mode. In this mode,
  32   33                                 zlogin invokes login(1) to provide a suitable
  33   34                                 login session.
  34   35  
  35   36  
  36   37         Non-Interactive Mode
  37      -                               If a utility is specified, zlogin operates in
  38      -                               non-interactive mode.  This mode can be useful
  39      -                               for script authors since stdin, stdout, and
  40      -                               stderr are preserved and the exit status of
  41      -                               utility is returned upon termination. In this
  42      -                               mode, zlogin invokes su(1M) in order to set up
  43      -                               the user's environment and to provide a login
  44      -                               environment.
       38 +                               If a utility is specified and the -i option is
       39 +                               not specified, zlogin operates in non-
       40 +                               interactive mode.  This mode can be useful for
       41 +                               script authors since stdin, stdout, and stderr
       42 +                               are preserved and the exit status of utility is
       43 +                               returned upon termination. In this mode, zlogin
       44 +                               invokes su(1M) in order to set up the user's
       45 +                               environment and to provide a login environment.
  45   46  
  46   47                                 The specified command is passed as a string and
  47   48                                 interpreted by a shell running in the non-
  48   49                                 global zone. See rsh(1).
  49   50  
  50   51  
  51   52         Console Mode
  52   53                                 If the -C option is specified, the user is
  53   54                                 connected to the zone console device and zlogin
  54   55                                 operates in console mode. The zone console is
  55   56                                 available once the zone is in the installed
  56   57                                 state. Connections to the console are
  57   58                                 persistent across reboot of the zone.
  58   59  
  59   60  
       61 +       Standalone-processs Interactive Mode
       62 +                               If the -I option is specified the user is
       63 +                               connected to the zone's stdin, stdout and
       64 +                               stderr zfd(7D) devices.
       65 +
       66 +
  60   67  OPTIONS
  61   68         The following options are supported:
  62   69  
  63   70         -C
  64   71                        Connects to the zone console.
  65   72  
  66   73  
  67   74         -d
  68   75                        Disconnect from the console when the zone halts. This
  69   76                        option may only be used if the -C option is specified.
↓ open down ↓ 5 lines elided ↑ open up ↑
  75   82                        disconnect from the login. The default escape character
  76   83                        is the tilde (~).
  77   84  
  78   85  
  79   86         -E
  80   87                        Disables the ability to access extended functions or to
  81   88                        disconnect from the login by using the escape sequence
  82   89                        character.
  83   90  
  84   91  
       92 +       -i
       93 +                      Forces interactive mode when a utility argument is
       94 +                      specified.
       95 +
       96 +
       97 +       -I
       98 +                      Connects to the zone's zfd(7D) devices.
       99 +
      100 +
      101 +
  85  102         -l username
  86  103                        Specifies a different username for the zone login. If
  87  104                        you do not use this option, the zone username used is
  88  105                        "root". This option is invalid if the -C option is
  89  106                        specified.
  90  107  
  91  108  
  92  109         -n
  93  110                        Redirect the input of zlogin to /dev/null.  This option
  94  111                        is useful when the command running in the local zone and
  95  112                        the shell which invokes zlogin both read from standard
  96  113                        input.
  97  114  
  98  115  
      116 +       -N
      117 +                      Nohup. This may only be used with the -I option to avoid
      118 +                      sending EOF to the zfd device when zlogin's stdin
      119 +                      receives EOF. It can also be toggled by sending SIGUSR1
      120 +                      to an attached zlogin process.
      121 +
      122 +
  99  123         -Q
 100  124                        Specifies quiet mode operation.  In quiet mode, extra
 101  125                        messages indicating the the function of zlogin will not
 102  126                        be displayed, giving the possibility to present the
 103  127                        appearance that the command is running locally rather
 104  128                        than in another zone.
 105  129  
 106  130  
 107  131         -S
 108  132                        "Safe" login mode. zlogin does minimal processing and
↓ open down ↓ 79 lines elided ↑ open up ↑
 188  212         login(1), rsh(1), vi(1), su(1M), zoneadm(1M), zonecfg(1M),
 189  213         attributes(5), zones(5)
 190  214  
 191  215  NOTES
 192  216         zlogin fails if its open files or any portion of its address space
 193  217         corresponds to an NFS file. This includes the executable itself or the
 194  218         shared libraries.
 195  219  
 196  220  
 197  221  
 198      -                                March 17, 2015                       ZLOGIN(1)
      222 +                                March 30, 2015                       ZLOGIN(1)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX