From owner-freebsd-bugs Tue Nov 20 17: 2:20 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id DECB637B41A for ; Tue, 20 Nov 2001 17:02:16 -0800 (PST) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id fAL11uq97866; Tue, 20 Nov 2001 20:01:56 -0500 (EST) (envelope-from arr@FreeBSD.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Tue, 20 Nov 2001 20:01:56 -0500 (EST) From: "Andrew R. Reiter" X-Sender: arr@fledge.watson.org To: Mikhail Teterin Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/32138: better progress reporting for dump(8) In-Reply-To: <200111202010.fAKKA2E04242@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Tue, 20 Nov 2001, Mikhail Teterin wrote: :The following reply was made to PR bin/32138; it has been noted by GNATS. : :From: Mikhail Teterin :To: iedowse@maths.tcd.ie :Cc: arr@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org :Subject: Re: bin/32138: better progress reporting for dump(8) :Date: Tue, 20 Nov 2001 15:06:20 -0500 (EST) : : On 20 Nov, Ian Dowse wrote: : > In message , : > "Andrew R. Reiter" writes: : >> : >>setproctitle() should not even be used in the handler. : > : > Is it being called from a signal handler? : : It is not. Not now, not in the original PR, not in the version last sent : to -arch (three weeks ago). Unless your handler _does_not_ call title(), then your statement is incorrect. : : >You can avoid this side-effect by telling setproctitle not to print the : >last character, i.e: : : > lastlen = strlen(lastmsg); : > if (lastlen > 0 && lastmsg[lastlen - 1] == '\n') : > lastlen--; : > setproctitle("%s: %.*s", disk, lastlen, lastmsg); : : Yes! That's a good one... Thanks, : : -mi : : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-bugs" in the body of the message : -- Andrew R. Reiter arr@watson.org arr@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message