Subject: defunct process slots

From: [email-masked] (SARAO)
Date: Tue, 14 Feb 1995 16:19:41 -0500

Good Afternoon,

        I seem to be having a problem with poeple attaching to my
FTP site and my system creates <defunct> users using the FTPD software.
This machine is an OSF/1 v3.0 on an Alpha 2100 server. These <defunct>
users take up process slots and eventually hang the system. Doing an 
FTPWHO shows no users in fact when I log in locally I am user -1. 
I use the same example for a banner page that is in the "Managing 
Internet Information Services" book by Oreilly... 

        Anyone seen anything like this.....

                                                /Sarao
****************************************************************************
*                                                                          *
*    Do you Rhumba...? Only when I take Bicarbonate...!                    *
*                                                 -Jerome Howard           *
*                                                           -NN09-         *
****************************************************************************

---

From: Vidiot <[email-masked]>
Date: Tue, 14 Feb 1995 20:11:17 -0600 (CST)

<        I seem to be having a problem with poeple attaching to my
<FTP site and my system creates <defunct> users using the FTPD software.
<This machine is an OSF/1 v3.0 on an Alpha 2100 server. These <defunct>
<users take up process slots and eventually hang the system. Doing an 
<FTPWHO shows no users in fact when I log in locally I am user -1. 
<I use the same example for a banner page that is in the "Managing 
<Internet Information Services" book by Oreilly... 

Yep, I've seen and I've fixed (using a patch provided by one of the reader's
of this mailist).  I've attached it below.  You might have to modify the
header part, since it has been set up for SunOS.

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: [email-masked]
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - http://www.ftms.com/vidiot/  (Your link to the world of Star Trek)

*** ftpd.c.orig	Wed Apr 13 16:17:18 1994
--- ftpd.c	Fri Nov 25 14:22:10 1994
***************
*** 77,83 ****
  #else
  #include <syslog.h>
  #endif
! #include <time.h>
  #include "conversions.h"
  #include "extensions.h"
  #include "pathnames.h"
--- 77,83 ----
  #else
  #include <syslog.h>
  #endif
! #include <sys/time.h>
  #include "conversions.h"
  #include "extensions.h"
  #include "pathnames.h"
***************
*** 1707,1714 ****
--- 1707,1728 ----
          int s,
            fromlen = sizeof(from);
  
+ #ifdef FD_ZERO
+ 	struct timeval timeout;
+ 	fd_set set;
+ 
+ 	FD_ZERO(&set);
+ 	FD_SET(pdata, &set);
+ 
+ 	timeout.tv_usec = 0;
+ 	timeout.tv_sec = 120;
+ 
+ 	if (select(pdata+1, &set, (fd_set *) 0, (fd_set *) 0, &timeout) == 0 ||
+ 	    (s = accept(pdata, (struct sockaddr *) &from, &fromlen)) < 0) {
+ #else
          s = accept(pdata, (struct sockaddr *) &from, &fromlen);
          if (s < 0) {
+ #endif
              reply(425, "Can't open data connection.");
              (void) close(pdata);
              pdata = -1;