[news.software.b] inews pl 17 / mhopen etc. - Problem

zessel@incas.UUCP (Holger Zessel AG Nehmer) (05/10/89)

Hello newslanders !

After installing patches 15 to 17 my inews has some problems
with sending mail to the newsmaster. It seems to block
while feeding mail into mail (or submit). This happens
e.g. with rnews -U while unpacking batches.

Does anybody have similar prioblems and got a solution ?

Holger Zessel

----------------------------------------------------------------
Holger Zessel, uucp: ...!uunet!unido!uklirb!incas!zessel
		or	incas!zessel@uklirb.uucp
Fachbereich Informatik, SFB124-D1
Universitaet Kaiserslautern, West-Germany

mark@sickkids.UUCP (Mark Bartelt) (07/26/89)

Here's a belated followup to a posting from mid-May.  I didn't notice any
other responses to it.  I find this mildly surprising, since we too have
seen the behaviour described (at least with newgroup control messages), so
I'd expect the problem is fairly widespread.  Anyway, ...

In article <2113@incas.UUCP> zessel@incas.UUCP (Holger Zessel) writes:

> After installing patches 15 to 17 my inews has some problems
> with sending mail to the newsmaster. It seems to block
> while feeding mail into mail (or submit). This happens
> e.g. with rnews -U while unpacking batches.

> Does anybody have similar prioblems and got a solution ?

Yes, and yes.  The problem is due to the fact that:

(1)  Patches 15-17 caused the closing of the pipe to the mail process [by
calling mclose()] to be deferred until near the end of insert().  Prior to
the patch, this was done in c_newgroup() (and elsewhere), before unlock()
was called.

(2)  The call to unlock() in c_newgroup() therefore doesn't remove the lock,
since the mail subprocess is still hanging around with the file descriptor
(used for locking) still open.

(3)  The next call to lock() [from localize(), from insert()] therefore hangs.

The fix is easy.  In control.c/mhopen(), insert ...

                unlock();

... anywhere between ...

        if((pid = vfork()) == 0) {

... and the first execl().

---------------

Mark Bartelt                          UUCP: {utzoo,decvax}!sickkids!mark
Hospital for Sick Children, Toronto   BITNET: mark@sickkids.utoronto
416/598-6442                          INTERNET: mark@sickkids.toronto.edu