Name

SPVM::UV::StdioContainer - libuv Stdio Container

Description

UV::StdioContainer class in SPVM represents a stdio container used in libuv process spawning. See uv_stdio_container_t.

Usage

use UV::StdioContainer;
use UV::Constant as UV_C;

my $container = UV::StdioContainer->new;
$container->set_flags(UV_C->UV_INHERIT_FD);
$container->set_fd(0);

Fields

stream

has stream : UV::Handle::Stream;

A stream associated with this stdio container.

Class Methods

new

static method new : UV::StdioContainer ();

Creates a new libuv stdio container.

Instance Methods

flags

method flags : int ();

Gets the flags of the container. See uv_stdio_flags.

set_flags

method set_flags : void ($flags : int);

Sets the flags of the container.

stream

method stream : UV::Handle::Stream ();

Gets the stream of the container.

Exceptions:

If flags is not UV_CREATE_PIPE or UV_INHERIT_STREAM, an exception is thrown.

set_stream

method set_stream : void ($stream : UV::Handle::Stream);

Sets the stream of the container.

Exceptions:

If flags is not UV_CREATE_PIPE or UV_INHERIT_STREAM, an exception is thrown.

fd

method fd : int ();

Gets the file descriptor of the container.

Exceptions:

If flags is not UV_INHERIT_FD, an exception is thrown.

set_fd

method set_fd : void ($fd : int);

Sets the file descriptor of the container.

Exceptions:

If flags is not UV_INHERIT_FD, an exception is thrown.

DESTROY

method DESTROY : void ();

Destroys the container and releases its resources.

Repository

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2026 Yuki Kimoto

MIT License