Subject: inews.pl patch #1 CORRECTED (part 1 of 1)

From: [email-masked] (Kenneth Herron)
Date: 20 Jan 92 14:17:28 GMT

[This supersedes the patch I posted last night; if you've already applied
it you just need to correct the line that exec's anne.jones.pl]

I don't know how this didn't get caught before, but the code which runs
anne.jones.pl is all wrong; one result being that anne.jones' exit status
is lost.  I'm somewhat amazed it ever worked right.

Anyway, this fixes things.  Just pipe it to patch with inews.pl in the
current directory.

=================cut here====================

*** dist-1.0/inews.pl	Sun Jan 19 22:35:29 1992
--- inews.pl	Mon Jan 20 09:12:00 1992
***************
*** 1,7
  #! /usr/local/perl
  #
  # inews.pl -- a perl inews replacement for C news, by Kenneth Herron
! # version 1.0, released 8-Jan-1992.
  # Placed in the public domain.  No warranty is expressed or implied.
  #
  require '/var/lib/cnews/config.pl';

--- 1,7 -----
  #! /usr/local/perl
  #
  # inews.pl -- a perl inews replacement for C news, by Kenneth Herron
! # version 1.1, released 19-Jan-1992.
  # Placed in the public domain.  No warranty is expressed or implied.
  #
  require '/var/lib/cnews/config.pl';
***************
*** 234,240
  
  # run the headers through anne.jones -- since anne.jones buffers headers
  # there is no risk of deadlock.
- pipe(AJR,AJW);
  pipe(INR,INW);
  if (0 == open(AJ, "-|")) {
  	# child process

--- 234,239 -----
  
  # run the headers through anne.jones -- since anne.jones buffers headers
  # there is no risk of deadlock.
  pipe(INR,INW);
  if (0 == open(AJR, '-|')) {
  	# child process
***************
*** 236,242
  # there is no risk of deadlock.
  pipe(AJR,AJW);
  pipe(INR,INW);
! if (0 == open(AJ, "-|")) {
  	# child process
  	close(INW); close(AJR);
  	open(STDOUT, ">&AJW");

--- 235,241 -----
  # run the headers through anne.jones -- since anne.jones buffers headers
  # there is no risk of deadlock.
  pipe(INR,INW);
! if (0 == open(AJR, '-|')) {
  	# child process
  	close(INW); close(AJR);
  	open(STDIN, '<&INR');
***************
*** 239,246
  if (0 == open(AJ, "-|")) {
  	# child process
  	close(INW); close(AJR);
! 	open(STDOUT, ">&AJW");
! 	open(STDIN, "<&INR");
  	exec 'anne.jones.pl';
  }
  else {

--- 238,245 -----
  if (0 == open(AJR, '-|')) {
  	# child process
  	close(INW); close(AJR);
! 	open(STDIN, '<&INR');
! 	close(INR);
  	exec 'anne.jones.pl';
  }
  else {
***************
*** 245,251
  }
  else {
  	# parent
! 	close(INR); close(AJW);
  	foreach $h (keys %hdr) {
  		print INW $h, ': ', $hdr{$h}, "\n";
  	}

--- 244,250 -----
  }
  else {
  	# parent
! 	close(INR);
  	foreach $h (keys %hdr) {
  		print INW $h, ': ', $hdr{$h}, "\n";
  	}
=================That's the patch===================
-- 
Kenneth Herron                                       [email-masked]
University of Kentucky                                  +1 606 257 2975
Department of Mathematics
"You don't carve 'ARGH,' you just say it!"  "Perhaps he was dictating?"