Sorry if this is a dumb question, but after years of DOS programming, I
am still discovering the subletiest of Unix:

When I create a pipe, do I have to use it for interprocess communication
only, or can the same process write to one end and later read from the
other?

What I am looking for is to use it as a FIFO-style buffer. Instead of
allocating and reallocating memory, let the system worry about how
much memory the data needs. This is for a two (or more) pass compiler,
which reads from stdin and writes to stdout. It does not know how much
data it still has coming in, so it has no idea how much memory it needs
to store information in, yet after one pass it needs to read it in the
same order it was written (FIFO).

If this is possible, is there a limit as to how much I can write to the
pipe before I start reading it, or is it limitless (within reason, of
course)?

Cheers,
Adam



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to