From nsmart@www.in-design.com  Thu Jun  4 02:20:28 1998
Received: from www.in-design.com (www.in-design.com [206.210.93.16])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA03867
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 4 Jun 1998 02:20:26 -0700 (PDT)
          (envelope-from nsmart@www.in-design.com)
Received: (from nsmart@localhost)
	by www.in-design.com (8.8.7/8.8.5) id FAA21144;
	Thu, 4 Jun 1998 05:20:18 -0400 (EDT)
Message-Id: <199806040920.FAA21144@www.in-design.com>
Date: Thu, 4 Jun 1998 05:20:18 -0400 (EDT)
From: njs3@doc.ic.ac.uk
Reply-To: njs3@doc.ic.ac.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: [URGENT][PATCH] svc_run: - select failed: No child processes
X-Send-Pr-Version: 3.2

>Number:         6855
>Category:       bin
>Synopsis:       [urgent] [patch] svc_run: - select failed: No child processes
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun  4 02:20:01 PDT 1998
>Closed-Date:    Thu Jun 4 13:49:34 PDT 1998
>Last-Modified:  Wed Jan 14 20:23:14 UTC 2009
>Originator:     njs3@doc.ic.ac.uk
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
>Environment:

-stable only, patch already committed to -current.

>Description:

portmap.c: reap() clobbers errno leading to failure of portmap daemon

>How-To-Repeat:

Run a busy RPC server

>Fix:


*** portmap.c	Thu Jun  4 10:02:58 1998
--- portmap.c	Thu Jun  4 10:02:49 1998
***************
*** 85,90 ****
--- 85,91 ----
   */
  
  #include <err.h>
+ #include <errno.h>
  #include <netdb.h>
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 604,608 ****
--- 605,613 ----
  void
  reap()
  {
+ 	int save_errno;
+ 
+ 	save_errno = errno;
  	while (wait3((int *)NULL, WNOHANG, (struct rusage *)NULL) > 0);
+ 	errno = save_errno;
  }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Thu Jun 4 13:49:34 PDT 1998 
State-Changed-Why:  
Patch already committe by 'wpaul'. 
>Unformatted:
