From owner-cvs-all Thu Jan 2 20:35: 5 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D167F37B401; Thu, 2 Jan 2003 20:35:04 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DA1C43EC5; Thu, 2 Jan 2003 20:35:04 -0800 (PST) (envelope-from tjr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h034Z4fh091155; Thu, 2 Jan 2003 20:35:04 -0800 (PST) (envelope-from tjr@repoman.freebsd.org) Received: (from tjr@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h034Z4B6091154; Thu, 2 Jan 2003 20:35:04 -0800 (PST) Message-Id: <200301030435.h034Z4B6091154@repoman.freebsd.org> From: "Tim J. Robbins" Date: Thu, 2 Jan 2003 20:35:04 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/gen popen.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG tjr 2003/01/02 20:35:04 PST Modified files: lib/libc/gen popen.c Log: Protect pidlist with a mutex to avoid a race causing a duplicate free() when the same pipe FILE is pclosed()'d in different threads, and to avoid corrupting the linked list when adding or removing items. The symptoms of the linked list getting corrupted were pclose() either not finding the pipe on the list, or the list becoming circular and pclose() looping infinitely. Revision Changes Path 1.17 +24 -8 src/lib/libc/gen/popen.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message