Pipe type

Wrapper around file descriptors returned by PIPE(2)

Direct children types

PipeFromChildProcess
Undocumented
Direct subtypes: 3
PipeToChildProcess
Undocumented
Direct subtypes: 2

Methods

close_reading_end(p:Pipe) Source: stdlib.ngs:4473
Close reading end of the Pipe
close_writing_end(p:Pipe) Source: stdlib.ngs:4470
Close writing end of the Pipe
dup2_reading_end(p:Pipe, newfd:Int) Source: stdlib.ngs:4498
DUP2(2) reading file descriptor
dup2_writing_end(p:Pipe, newfd:Int) Source: stdlib.ngs:4495
DUP2(2) writing file descriptor
init(pipe:Pipe) Source: stdlib.ngs:4437
Pipe constructor. Create UNIX pipe using PIPE(2). Throws PipeCreateFail if pipe can not be created.

Example

p = Pipe()
init(pipe:Pipe, other:Pipe) Source: stdlib.ngs:4449
Initializes Pipe, copying read_fd and write_fd from another Pipe.

Example

my_pipe = ...
second_pipe = Pipe(my_pipe)
read(p:Pipe, count:Any=null) Source: stdlib.ngs:4490
Read from Pipe without parsing. TODO: document if it throws.

Returns

read data

Example

data = read(myipe)
Str(p:Pipe) Source: stdlib.ngs:4465
Undocumented
write(s:Str, p:Pipe)deprecated Source: stdlib.ngs:4478
DEPRECATED! Do not use!
write(p:Pipe, s:Str) Source: stdlib.ngs:4484
Write to Pipe. TODO: document if it throws.

Returns

unspecified at this time, do not count on it