From owner-freebsd-bugs Sat Nov 10 9:29: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 83DA837B438; Sat, 10 Nov 2001 09:29:04 -0800 (PST) Received: (from tobez@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAAHOTe21914; Sat, 10 Nov 2001 09:24:29 -0800 (PST) (envelope-from tobez) Date: Sat, 10 Nov 2001 09:24:29 -0800 (PST) From: Message-Id: <200111101724.fAAHOTe21914@freefall.freebsd.org> To: bachue@bachue.com, tobez@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/31836: When killed Perl should flush output buffers Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Synopsis: When killed Perl should flush output buffers State-Changed-From-To: open->closed State-Changed-By: tobez State-Changed-When: Sat Nov 10 09:20:40 PST 2001 State-Changed-Why: > When the Perl interpreter is killed with SIGINT or SIGTERM (and > probably many other trappable signals), it doesn't flush its output > buffers. It should not. If you want this functionality, set your own signal handlers ($SIG{INT} = sub { ... }; $SIG{TERM} = sub { ... };). It is not the job of the interpreter to do this. Perl, just like C, uses stdio, which is buffered by default. In C, just like in Perl, you will have to set your own signal handlers if you want to flush the buffers on a signal. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31836 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message