On Sun, Jan 08, 2012 at 05:19:22PM +0100, Simon Kuhnle wrote:
> On Mon, Nov 21, 2011 at 12:52:02PM +0100, Simon Kuhnle wrote:
> > I did a port of nzbget (http://nzbget.sourceforge.net/)
> > and one for libpar2 (which is a dependency for nzbget).
> > 
> > Tested on amd64 and sparc64, works fine for me.
> > 
> > Please test and comment:
> > http://blarzwurst.de/openbsd/libpar2.tgz
> > http://blarzwurst.de/openbsd/nzbget.tgz
> 
> I got a report that nzbget in servermode was crying after downloading
> the first nzb file. I could reproduce this:
> 
> ERROR   Could not accept connection: ErrNo 4, Interrupted system call
> ERROR   Binding socket failed for 127.0.0.1: ErrNo 48, Address already in use
> 
> I don't know why this doesn't happen under Linux,
> but I added a patch that tries accept() again,
> if errno was set to EINTR. Tarballs are up to date.
> 
> Any hints for a cleaner way to do this would be appreciated.

After some discussion with the nzbget maintainer,
we found the bug:
setting up a SIGCHLD handler (which did nothing in this case)
and doing waitpid(2) seems to do no harm on Linux,
but does strange things on OpenBSD (POSIX says, having both set up
leads to unspecified behaviour).

Just removing the SIGCHLD-Handler fixed it.
(fixed in upstream svn since yesterday)

http://blarzwurst.de/openbsd/libpar2.tgz
http://blarzwurst.de/openbsd/nzbget.tgz

Tests and comments still appreciated.
-- 
Simon

Reply via email to