HP3000-L Archives

November 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Craig Fairchild <[log in to unmask]>
Reply To:
Craig Fairchild <[log in to unmask]>
Date:
Tue, 11 Nov 1997 10:42:01 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
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

ATOM RSS1 RSS2