Table of Contents

Method pipe

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

pipe(int[])

Creates a unidirectional data channel for inter-process communication.

public static extern int pipe(int[] fds)

Parameters

fds int[]

An array of two integers where the file descriptors for the read and write ends of the pipe will be stored. The first element represents the read end, and the second element represents the write end.

Returns

int

Returns 0 on success. On failure, returns -1 and sets the global errNo variable to indicate the error.

Remarks

The pipe is a unidirectional communication channel, meaning data written to the write end can be read from the read end. The caller is responsible for ensuring that the fds array has exactly two elements.