Foundry.UnixFDMap

g Foundry.UnixFDMap Foundry.UnixFDMap GObject.Object GObject.Object GObject.Object->Foundry.UnixFDMap

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

create_stream (dest_read_fd, dest_write_fd)

get (index, dest_fd)

get_length ()

get_max_dest_fd ()

open_file (filename, mode, dest_fd)

peek (index, dest_fd)

peek_stderr ()

peek_stdin ()

peek_stdout ()

silence_fd (dest_fd)

stderr_isatty ()

stdin_isatty ()

stdout_isatty ()

steal (index, dest_fd)

steal_from (other)

steal_stderr ()

steal_stdin ()

steal_stdout ()

take (source_fd, dest_fd)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.UnixFDMap(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.UnixFDMapClass

classmethod new()
Return type:

Foundry.UnixFDMap

create_stream(dest_read_fd, dest_write_fd)
Parameters:
  • dest_read_fd (int) – the FD number in the destination process for the read side (stdin)

  • dest_write_fd (int) – the FD number in the destination process for the write side (stdout)

Raises:

GLib.Error

Returns:

a Gio.IOStream if successful; otherwise None and error is set.

Return type:

Gio.IOStream

Creates a Gio.IOStream to communicate with another process.

Use this to create a Gio.IOStream to use from the calling process to communicate with a subprocess. Generally, you should pass STDIN_FILENO for dest_read_fd and STDOUT_FILENO for dest_write_fd.

get(index, dest_fd)
Parameters:
  • index (int) –

  • dest_fd (int) –

Raises:

GLib.Error

Return type:

int

get_length()
Return type:

int

get_max_dest_fd()
Return type:

int

open_file(filename, mode, dest_fd)
Parameters:
  • filename (str) –

  • mode (int) –

  • dest_fd (int) –

Raises:

GLib.Error

Return type:

bool

peek(index, dest_fd)
Parameters:
  • index (int) –

  • dest_fd (int) –

Return type:

int

peek_stderr()
Return type:

int

peek_stdin()
Return type:

int

peek_stdout()
Return type:

int

silence_fd(dest_fd)
Parameters:

dest_fd (int) –

Raises:

GLib.Error

Return type:

bool

stderr_isatty()
Return type:

bool

stdin_isatty()
Return type:

bool

stdout_isatty()
Return type:

bool

steal(index, dest_fd)
Parameters:
  • index (int) –

  • dest_fd (int) –

Return type:

int

steal_from(other)
Parameters:

other (Foundry.UnixFDMap) –

Raises:

GLib.Error

Return type:

bool

steal_stderr()
Return type:

int

steal_stdin()
Return type:

int

steal_stdout()
Return type:

int

take(source_fd, dest_fd)
Parameters:
  • source_fd (int) –

  • dest_fd (int) –