The following characteristics of FIFO behavior may be helpful in using them effectively.
Operation |
Result |
$DEVICE |
$ZA |
$TEST |
X |
$ZEOF |
---|---|---|---|---|---|---|
READ X:n |
Normal Termination |
0 |
0 |
1 |
Data Read |
0 |
READ X:n |
Timeout with no data read |
0 |
0 |
0 |
empty string |
0 |
READ X:n |
Timeout with partial data read |
0 |
0 |
0 |
Partial data |
0 |
READ X:n |
End of File |
1,Device detected EOF |
9 |
1 |
empty string |
1 |
READ X:0 |
Normal Termination |
0 |
0 |
1 |
Data Read |
0 |
READ X:0 |
No data available |
0 |
0 |
0 |
empty string |
0 |
READ X:0 |
Timeout with partial data read |
0 |
0 |
0 |
Partial data |
0 |
READ X:0 |
End of File |
1,Device detected EOF |
9 |
1 |
empty string |
1 |
READ X |
Error |
1,<error signature> |
9 |
n/c |
empty string |
0 |
![]() | Note |
---|---|
If an existing named pipe (aka fifo special file) is OPENed even without specifying the FIFO deviceparameter, it is treated as if FIFO had been specified. |
set x="named.pipe" open x:fifo do getres use x write res,!
set x="named.pipe" open x:fifo use x read res do process(res)
This routine waits for information from the master process, then begins processing.
The following table summarizes the deviceparameters that can be used with FIFOs.
File Format Deviceparameters | ||
---|---|---|
DEVICEPARAMETER |
CMD |
DESCRIPTION |
[NO]FIXED |
O |
Controls whether records have fixed length. |
[Z]LENGTH=intexpr |
U |
Controls the virtual page length. |
RECORDSIZE=intexpr |
O |
Specifies the maximum record size. |
VARIABLE |
O |
Controls whether records have variable length. |
[Z]WIDTH=intexpr |
U |
Sets the device's logical record size and enables WRAP. |
[Z][NO]WRAP |
O/U |
Controls the handling of records longer than the device width. |
File Access Deviceparameters | ||
---|---|---|
DEVICEPARAMETER |
CMD |
COMMENT |
DELETE |
C |
Specifies that the FIFO should be deleted when the last user closes it. If specified on an OPEN, DELETE is activated only at the time of the close. No new attachements are allowed to a deleted FIFO and any new attempt to use a FIFO with the name of the deleted device creates a new device. |
GROUP=expr |
O/C |
Specifies file permissions for other users in owner's group. |
[NO]READONLY |
O |
OPENs a device for reading only (READONLY) or reading and writing (NOREADONLY). |
OWNER=expr |
O/C |
Specifies file permissions for owner of file. |
RENAME=expr |
C |
Specifies that CLOSE rename a disk file with the name specified by the expression. |
REPLACE=expr |
C |
Specifies that CLOSE replace(overwrite an existing file if necessary) the name of a disk file with the name specified by the expression. |
SYSTEM=expr |
O/C |
Specifies file permissions for owner of file (same as OWNER). |
UIC=expr |
O/C |
Specifies the file's owner ID. |
WORLD=expr |
O/C |
Specifies file permissions for users not in the owner's group. |