🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #582

PMDF vs. 4.3BSD

#582
From: Gene Spafford
Date: Fri, 03 Oct 1986 16:00
87 lines
2640 bytes
If any of you are running PMDF II (as many CSNet sites are), you will
discover that PMDF will not work once you convert to 4.3BSD.  It works
a little, but keeps timing out and your queue keeps growing.

Well, after a few dead-ends, we found the problem.  The following
changes should be made to your PMDF code and then the whole
package should be recompiled and relinked.

Mark Johnson
Gene Spafford
	postmasters at GaTech


*** osc.c.orig	Wed Oct  1 10:41:55 1986
--- osc.c	Wed Oct  1 10:59:44 1986
***************
*** 10,15 ****
--- 10,16 ----
  #include <stdio.h>
  #include <fcntl.h>
  #include  <sgtty.h>
+ #include <sys/types.h>
  #include "pcvars.h" /* excerpt from h00vars.h */
  
  #define R_OK 4
***************
*** 236,248 ****
  
  	register int r;
  	struct timeval timeout;
! 	int readfs;
  
  	timeout.tv_sec = timelimit;
  	timeout.tv_usec = 0;
! 	readfs = 1;
! 	select(1,&readfs,0,0,&timeout);
! 	if (readfs == 0) return(0);
  	r = read(fileno(stdin),ch,1);
  	(*ch) &= 0x7f;
  	if (r < 0) return(-errno);
--- 237,251 ----
  
  	register int r;
  	struct timeval timeout;
! 	int s_result;
! 	fd_set readfs;
  
  	timeout.tv_sec = timelimit;
  	timeout.tv_usec = 0;
! 	FD_ZERO(&readfs);
! 	FD_SET(0, &readfs);
! 	s_result = select(1,&readfs,0,0,&timeout);
! 	if (s_result <= 0 || !FD_ISSET(0, &readfs)) return(0);
  	r = read(fileno(stdin),ch,1);
  	(*ch) &= 0x7f;
  	if (r < 0) return(-errno);
***************
*** 257,269 ****
  
  {
  	struct timeval timeout;
! 	int readfs;
  
  	timeout.tv_sec = timelimit;
  	timeout.tv_usec = 0;
! 	readfs = 1;
! 	select(1,&readfs,0,0,&timeout);
! 	if (readfs == 0) return(0); 
  	gets(packet->body, sizeof packet->body);
  	if ferror(stdin) {
  	  clearerr(stdin);
--- 260,274 ----
  
  {
  	struct timeval timeout;
! 	int s_result;
! 	fd_set readfs;
  
  	timeout.tv_sec = timelimit;
  	timeout.tv_usec = 0;
! 	FD_ZERO(&readfs);
! 	FD_SET(0, &readfs);
! 	s_result = select(1,&readfs,0,0,&timeout);
! 	if (s_result <= 0 || !FD_ISSET(0, &readfs)) return(0); 
  	gets(packet->body, sizeof packet->body);
  	if ferror(stdin) {
  	  clearerr(stdin);
Technical Details
Message-ID: <4604@gatech.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cuae2!gatech!spaf

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cuae2!gatech!spaf
From: spaf@gatech.EDU (Gene Spafford)
Newsgroups: net.bugs,net.mail
Subject: PMDF vs. 4.3BSD
Message-ID: <4604@gatech.EDU>
Date: Fri, 3-Oct-86 12:00:59 EDT
Article-I.D.: gatech.4604
Posted: Fri Oct  3 12:00:59 1986
Date-Received: Sat, 4-Oct-86 12:25:15 EDT
Organization: Software Engineering Research Center (SERC), Georgia Tech
Lines: 87