The pipe callable service creates a pipe. A pipe is an I/O channel that a process can use to communicate with another process, with another thread (in this same process or another process), or in some cases with itself. Data can be written into one end of the pipe and read from the other.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1PIP): | 31-bit |
AMODE (BPX4PIP): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4PIP with the same parameters.
The name of a fullword in which the pipe service stores the file descriptor for the read end of the pipe if the pipe is created successfully.
The name of a fullword in which the pipe service stores the file descriptor for the write end of the pipe if the pipe is created successfully.
The name of a fullword in which the pipe service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EMFILE | The process has either reached the maximum number of file descriptors it can have open, or the current pipe limit was exceeded. Refer to the reason code that was provided. |
ENFILE | Opening the pipe would exceed the number of files that the system can have open simultaneously. |
The name of a fullword in which the pipe service stores the reason code. The pipe service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the pipe service.
For an example using this callable service, see BPX1PIP (pipe) example.