From owner-freebsd-current Fri Aug 10 19: 4: 8 2001 Delivered-To: freebsd-current@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id E9A7237B41D; Fri, 10 Aug 2001 19:03:58 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id CFE1C81D05; Fri, 10 Aug 2001 21:03:48 -0500 (CDT) Date: Fri, 10 Aug 2001 21:03:48 -0500 From: Alfred Perlstein To: Michael Robinson Cc: current@freebsd.org, hackers@freebsd.org Subject: Re: _sigprocmask in malloc.c causes full file table? Message-ID: <20010810210348.T85642@elvis.mu.org> References: <200108110115.f7B1F4100321@netrinsics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200108110115.f7B1F4100321@netrinsics.com>; from robinson@netrinsics.com on Sat, Aug 11, 2001 at 09:15:04AM +0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Michael Robinson [010810 20:17] wrote: > I'm currently trying to deal with the problem where malloc/free in a > signal handler will crash (in my case, the X window server) if a signal > arrives during malloc or free. Yes, you are not supposed to call malloc/free from a signal handler unless you know exactly what you're doing when you do so. > Am I doing something completely boneheaded, or is this an undocumented > subtle interaction? You're expecting calls to free/malloc to work from within an async signal handler, so yes, you're being a bit boneheaded. :) -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message