Project: /_project.yaml Book: /_book.yaml
A PTY (pseudoterminal) emulates terminal devices, with a “server” side (which represents the keyboard+monitor side of the terminal and is obtained by opening /dev/misc/ptmx) and a number of “client” sides which are obtained by calling OpenClient
.
Client PTYs are identified by the id
used in the OpenClient
call. The first Client PTY must be 0, and it is the only Client PTY that is allowed to create additional Client PTYs, receive Events, etc. It is the Controlling PTY.
Defined in fuchsia.hardware.pty/pty.fidl
Create another connection to the same remote object.
flags
may be any of:
OPEN_RIGHT_*
OPEN_FLAG_APPEND
OPEN_FLAG_NO_REMOTE
OPEN_FLAG_DESCRIBE
CLONE_FLAG_SAME_RIGHTS
All other flags are ignored.
The OPEN_RIGHT_*
bits in flags
request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object. Alternatively, pass CLONE_FLAG_SAME_RIGHTS
to inherit the rights on the source connection. It is invalid to pass any of the OPEN_RIGHT_*
flags together with CLONE_FLAG_SAME_RIGHTS
.
Terminates connection with object.
This method does not require any rights.
Returns extra information about the type of the object. If the Describe
operation fails, the connection is closed.
This method does not require any rights.
An event produced eagerly by a FIDL server if requested by OPEN_FLAG_DESCRIBE
.
Indicates the success or failure of the open operation, and optionally describes the object. If the status is ZX_OK
, info
contains descriptive information about the object (the same as would be returned by Describe
).
Synchronizes updates to the node to the underlying media, if it exists.
This method does not require any rights.
Acquires information about the node.
This method does not require any rights.
Updates information about the node. flags
may be any of NODE_ATTRIBUTE_FLAG_*
.
This method requires following rights: OPEN_RIGHT_WRITABLE
.
Deprecated. Only for use with compatibility with devhost.
Reads ‘count’ bytes at the seek offset. The seek offset is moved forward by the number of bytes read.
This method requires following rights: OPEN_RIGHT_READABLE
.
Reads ‘count’ bytes at the provided offset. Does not affect the seek offset.
This method requires following rights: OPEN_RIGHT_READABLE
.
Writes data at the seek offset. The seek offset is moved forward by the number of bytes written.
This method requires following rights: OPEN_RIGHT_WRITABLE
.
Writes data to the provided offset. Does not affect the seek offset.
This method requires following rights: OPEN_RIGHT_WRITABLE
.
Moves the offset at which the next invocation of Read()
or Write()
will occur.
This method does not require any rights.
Shrinks the file size to ‘length’ bytes.
This method requires following rights: OPEN_RIGHT_WRITABLE
.
Acquires the Directory::Open rights and flags used to access this file.
This method does not require any rights.
Changes the Directory::Open flags used to access the file. Supported flags which can be turned on / off:
OPEN_FLAG_APPEND
This method does not require any rights.
Acquires a buffer representing this file, if there is one, with the requested access rights.
flags
may be any of VMO_FLAG_*
.
This method requires following rights:
OPEN_RIGHT_WRITABLE
if flags
includes VMO_FLAG_WRITE
.OPEN_RIGHT_READABLE
if flags
includes VMO_FLAG_READ
or VMO_FLAG_EXEC
.Open a client PTY device with a unique id
. client
should be a handle to one endpoint of a channel that (on success) will become an open connection to the newly created device. On failure, the channel will be closed. Closing the channel will close the connection and release the device. If the provided id
is 0, then the new client is a controlling client and has the capability to open additional clients. If the current device is not a controlling client, ZX_ERR_ACCESS_DENIED
will be returned. If id
is not unique, ZX_ERR_INVALID_ARGS
will be returned. Otherwise the status code from device_add
is passed on.
Clear and/or Set PTY Features
Obtain the window size (in character cells)
Select which Client PTY receives input. Reads will simply block on non-active PTYs.
Returns pending OOB events, simultaneously clearing them
Sets the window size
Defined in fuchsia.hardware.pty/pty.fidl