1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright 2015, Joyent, Inc. All rights reserved.
.\"
.Dd "Oct 16, 2015"
.Dt ZFD 7D
.Os
.Sh NAME
.Nm zfd
.Nd Zone file descriptor driver
.Sh DESCRIPTION
The
.Nm zfd
character driver exports devices into the zone which can be used by a
a standalone process within the zone as
.Vt stdin ,
.Vt stdout ,
and
.Vt stderr .
The
.Nm zfd
driver behaves in a similar manner as the
.Nm zcons(7D)
device.
Inside a zone, the slave side devices appear as
.Nm /dev/zfd/[0-4] .
.sp
The zone's zfd device configuration is driven by
.Nm zoneadmd
and a zone attribute
.Nm zlog-mode
which is somewhat of a misnomer since its purpose has evolved.
The attribute can have a variety of values, but the lowest two positions
in the value string are used to control how many zfd devices are created
inside the zone and if the primary stream is a tty.
.sp
.Dl --
.Dl -n
.Dl t-
.Dl tn
.sp
With the
.Nm t
flag set,
.Vt stdin ,
.Vt stdout ,
and
.Vt stderr ,
are multiplexed onto a single full-duplex stream which is configured as a tty.
That is,
.Nm ptem ,
.Nm ldterm
and
.Nm ttycompat
are autopushed onto the stream when the slave side is opened.
There is only a single zfd device (0) needed for the primary stream.
.sp
When the
.Nm n
flag is set, it is assumed that output logging will be done within the zone
itself.
In this configuration 1 or 2 additional zfd devices, depending on tty mode
.Nm ( t
flag), are created within the zone.
An application can then configure the zfd streams driver into a multiplexer.
Output from the stdout/stderr zfd(s) will be teed into the correspond
logging zfd(s) within the zone.
.Sh SEE ALSO
.Xr zlogin 1 ,
.Xr zoneadmd 1M ,
.Xr zonecfg 1M ,
.Xr zcons 7D
|