"Dale Benedict" <dale_knowspam_benedict (AT) flightcraft (DOT) ca> wrote
Quote:
I'm trying to under stand the use of pipes within Pick. The documentation
indicates that I need to create a C program and include
"/usr/lib/pick/include/sigmon.h", but I cannot find this file on anything
that I have access to.
Does anyone have a copy of this file or know what it contains?
tia
Dale |
You don't need to create a C app to use named pipes. You can use the
mkfifo tool to create two FIFO "files" and then use %open with %read and
%write on the pair individually, to get bi-directional asynchronous I/O. You
can specify the two filenames on the same command line. EXECUTE "!mkfifo -m
0666 /tmp/mypipe0 /tmp/mypipe1", for example. When your app is done, just
delete the FIFO files. Make sure the user process that creates the FIFOs has
group permissions for all the user processes that will be reading/writing
from/to them. You can specify a group permission mode without jeopordizing
security. For example, if "pick" is running the service then every pick
process that is launched should be under a user that is in the same group as
"pick". Ideally, the two processes that are using a pair of named FIFOs
should have sole permissions to access those files. Global access
permissions is a no-no.
When you use the pipe() function in C, the function creates 2 handles for
local IPC; one for reading and one for writing to the parent/child process
after forking. You can achieve stand-alone named pipes by using FIFOs
instead.
Glen
http://mvdevcentral.com