On Mon, Oct 30, 2000 at 12:28:06PM -0800, Jeff Mayzurk wrote:
> I'm trying to write an efficient C interface to feed messages with large 
> recipient lists (500k+ subs) to qmail.
> 
> I've set up a pipe to qmail-queue in the style of qmail.c and ezmlm, except 
> I'm not using the substdio library.
> 
> The pipe works fine for small distribution lists, but I'm getting consistent 
> blocking after writing about 10KB of addresses (around 400 recipients) to the 
> pipe. qmail-queue is blocked in read() and my returns EAGAIN indefinitely on 
> write(), or blocks indefinitely without O_NONBLOCK set.

Sounds like an OS bug. If you're sure that qmail-queue is sitting on the pipe read
and you're sitting on a pipe write to the same pipe. What OS? Can you test your code
on another box with a different kernel/OS?
 
> Am I missing something? Anyone else successfully written a C interface to 
> qmail-queue they'd be willing to share?

Plenty of people have done it via qmail-inject with larger numbers than that,
and qmail-inject doesn't do anything special. Certainly there is no need for you
to go thru the machinations of non-blocking I/O, etc.


Regards.

Reply via email to