groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: pipeline problems with groff


From: Jeff Conrad
Subject: [Groff] Re: pipeline problems with groff
Date: Thu, 4 Dec 2003 17:33:41 -0800

Kees Zeelenber wrote:

> MSDN has several examples on how to use pipes and how to port fork /exec to

I guess it helps to look in the obvious places ... thanks for the reminder!

> It seems pipeline.c conforms exactly to these examples.

Except for using the C library wrappers for the Win32 APIs.

> So, the reverse case from the one reported on the groff list.

It seems to me like it's the same case as groff--the preprocessor seems to
be waiting for a read to empty the buffer.

In testing, I replaced the real troff with a modified "consumer" process
that exited after reading a certain number of bytes (but before the buffer
was empty), and if I waited for the child processes (i.e., preprocessors)
groff would hang just as when using the real troff.  Replacing the
preprocessor with a simple writer (or MKS cat) gave the same behavior,
either with troff or the modified consumer.

This from the MSVC documentation:

    "(If all read handles on the pipe have been closed, writing to the pipe
    causes an error.)  All read and write operations on the pipe wait until
    there is enough data or enough buffer space to complete the I/O
    request."

It doesn't sound encouraging.  Apparently the same problem arises when
using the Win32 APIs directly, so rewriting the code to use them doesn't
seem a likely solution.

Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]