Example 1: creating and using a named pipe from the shell
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
In the i-pipex1 example,
the cat command sets up a message handler routine
and the echo command acts as the requestor.
i-pipex1
|
To try this example, run the shell script, i-pipex1. This
script performs the following actions:
- The
mknodcommand creates a named pipe calledtrypipe. - The
catcommand openstrypipefor reading. It blocks becausetrypipehas not yet been opened for writing. Notice that an ampersand (&) is present at the end of thecatcommand; this runs thecatcommand as a background process. - The
echocommand openstrypipefor writing and writes a message. Thecatcommand, blocked until now, resumes execution, and the message appears on the display. - The
rmcommand deletestrypipe.