[net.news.b] Signal Handling in News Software

sml@luke.UUCP (Steven List @ Uncle Bene's Farm) (06/04/85)

In installing the news software (readnews, et al), my first experience
with it was continuous core dumps.  Investigation revealed that there
was a conflict between a global variable and a library function.

We are running Plexus' version of System III.  The `signal' library
function invokes subfunction `sigtrap' to establish the signal handling.
This is undocumented and dangerous.  There is a global used throughout
the news software named... `sigtrap'!  A simple change of `sigtrap' to
`trapsig' throughout the news software eliminated this problem.

A second set of core dumps occurred when using readnews.  Periodically
the SYSBUF buffer would OVERFLOW!  Rather than spend a lot of time
figuring out why it was overflowing into the next buffer (rcline), I
just doubled the size of the buffer.  Could there be some inconsistency
in the buffered I/O library routines?  SYSBUF is the buffer `setbuf'ed
for use with stdout.  The problem would apparently occur when an article
was less than 16 lines but greater than 512 bytes.

                                     /-\  
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
:                  Steven List @ Benetics Corporation                         :
:                              (415) 940-6300                                 :
:                  {cdp,idi,oliveb,tolerant}!bene!luke!steven                 :
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
                                     \-/