🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #496

Nasty bug in unbatch 2.10.3

#496
From: Edward C. Bennett
Date: Fri, 07 Feb 1986 22:38
49 lines
2073 bytes
	Recently I moved our news around and put things in some non-
standard places. I rebuilt the news software to reflect the changes
and installed it.
	When the first batches of news came in, uuxqt logged the
execution of rnews, but THE NEWS HAD DISAPPEARED! (/dev/blackhole
strikes again!)
	After much tracing I discovered the problem in unbatch. When
unbatch runs, it picks apart the batch and feeds the pieces to rnews.
The problem was that our rnews is in a wierd place not covered by
whatever PATH was in effect and the rnews was exec'ed without a full
pathname. Sloppy.
	The fix was simply to build the full pathname of rnews. Here
is the diff:

*** unbatch.c.orig	Fri Feb  7 17:24:11 1986
--- unbatch.c	Fri Feb  7 17:22:10 1986
***************
*** 89,95
  			(void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR);
  			execlp(buf, "rnews", (char *)0);
  #else
! 			execlp("rnews", "rnews", (char *)0);
  #endif
  			perror("rnews");
  			exit(1);

--- 89,100 -----
  			(void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR);
  			execlp(buf, "rnews", (char *)0);
  #else
! 			/*
! 			 * CHANGE - [Feb 7, edward@ukecc] Made the first
! 			 * arguement of execlp() the full pathname of rnews.
! 			 */
! 			(void) sprintf(buf, "%s/rnews", BINDIR);
! 			execlp(buf, "rnews", (char *)0);
  #endif
  			perror("rnews");
  			exit(1);
-- 
Edward C. Bennett

UUCP: ihnp4!cbosgd!ukma!ukecc!edward

Kentucky: The state that is being dragged, kicking and screaming,
	  into the 20th century.

"Goodnight M.A."
Technical Details
Message-ID: <375@ukecc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ukma!ukecc!edward

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 alpha 4/3/85; site ukecc.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ukma!ukecc!edward
From: edward@ukecc.UUCP (Edward C. Bennett)
Newsgroups: net.bugs
Subject: Nasty bug in unbatch 2.10.3
Message-ID: <375@ukecc.UUCP>
Date: Fri, 7-Feb-86 17:38:15 EST
Article-I.D.: ukecc.375
Posted: Fri Feb  7 17:38:15 1986
Date-Received: Sun, 9-Feb-86 07:19:32 EST
Organization: Univ. of Ky. Engineering Computing Center
Lines: 49