From owner-cvs-lib Fri Dec 20 11:41:18 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id LAA05135 for cvs-lib-outgoing; Fri, 20 Dec 1996 11:41:18 -0800 (PST) Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id LAA05126; Fri, 20 Dec 1996 11:41:17 -0800 (PST) Date: Fri, 20 Dec 1996 11:41:17 -0800 (PST) From: Bill Paul Message-Id: <199612201941.LAA05126@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/libc/yp yplib.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/12/20 11:41:16 Modified: lib/libc/yp yplib.c Log: Fix for bug noticed by Christoph Kukulies. _yp_dobind() checks to see if a fork() happens (by checking PIDs) and invalidates all bindings if it finds itself in a newly created child process. (This avoids sharing RPC client handles and socket descriptors with the parent, which would be bad.) Unfortunately, it summarily calls clnt_destroy() on the handles, which may result in the destruction of a descriptor that isn't really a socket. This is fixed by replacing the explicit call to clnt_destroy() with a call to _yp_unbind(), which deals with potentially hosed socket descriptors an a safe manner. This is basically a one-liner. Once I confirm that it fixes Christoph's problem, I'd like permission to put it in the 2.2-RELENG branch. Revision Changes Path 1.26 +3 -2 src/lib/libc/yp/yplib.c