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