Subject: | |
From: | |
Reply To: | |
Date: | Tue, 11 Nov 1997 10:42:01 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Nov 11, 5:12pm, Klaus Franke wrote:
> Subject: FIFO and HPFOPEN
> gentle readers,
> i am now trying to write to a posix-fifo-file from a cobol program.
> For this i use hpfopen with all items/inums, i could find.
>
> My programm works fine, but there is no output written to the fifo.
>
> Perhaps, someone can tell me, which are the correct items/inums to write to
an existing fifo-file (/tmp/fifo)?
>
>-- End of excerpt from Klaus Franke
I don't know if this is the actual problem or not, but one of the "gottchas"
about FIFO files comes from the POSIX defined behavior:
"When all file descriptors associated with a pipe or FIFO special file
have been closed, any data remaining in the pipe or FIFO shall be
discarded." Section 6.3.1.2 on the close() function description.
Your program may be successfully creating and writing the data to the FIFO
file, but if the program completes and no process has the FIFO file open, the
data will be discarded. This could describe what you are seeing.
Hope this helps,
Craig
--
Craig Fairchild
Email: [log in to unmask] Phone: (408) 447-5990
USPS: Hewlett-Packard Company Fax: (408) 447-4278
M/S 47UA
19447 Pruneridge Avenue
Cupertino, CA 95014
|
|
|