Sam Varshavchik writes:
> Alessandro Vesely writes: 
> 
> > Sam,
> > I have troubles using lf_accept in my filter. That's
> > because I to catch a HUP signal by getting out of select
> > with errno set to EINTR (the so-called SysV signal semantics.)
> > Since lf_accept returns -1 in that case and trusting errno is
> > not very reliable, I should either test again descriptor 0 or
> > call select on my own. Both alternatives involve duplicating
> > code that is already there. 
> > 
> > I include a zip file containing libfilter.[ch].patch where
> 
> Your patch does not make any sense.  Instead of returning -1, you're 
> returning 0, and changing it to -1 in a wrapper function.

Exactly: that way existing filters don't get broken.

> In other words, your patch does absolutely nothing.

Not correct. Since the patch also modifies libfilter.h, it allows
a sysv filter to call lf_sysv_accept directly and get 0 to exit,
or -1 for error, as documented therein.

Ale

_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to