From owner-freebsd-current Tue Sep 4 11:52:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by hub.freebsd.org (Postfix) with ESMTP id C32B537B425; Tue, 4 Sep 2001 11:52:37 -0700 (PDT) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.11.5/8.11.5) with ESMTP id f84Ipfo55193; Tue, 4 Sep 2001 14:51:42 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Message-Id: <200109041851.f84Ipfo55193@aldan.algebra.com> Date: Tue, 4 Sep 2001 14:51:38 -0400 (EDT) From: Mikhail Teterin Subject: Re: proctitle progress reporting for dump(8) To: tlambert2@mindspring.com Cc: asmodai@wxs.nl, current@freebsd.org, arch@freebsd.org In-Reply-To: <3B9474B1.18EC6692@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii 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 On 3 Sep, Terry Lambert wrote: >> > >> > I would like it. How often does it update the proctitle? >> >> Whenever it outputs a line to the stderr -- I personally find no >> regularity in that :(. SIGINFO handling is a different thing, though. >> I'll look at that too. Thanks, > It would be nice to have in a SIGINFO handler as well, but since your > application is dump run by Amanda as a background process, a > SIGINFO is not very useful, unless it was being suggested that the > setproctitle() be called from a SIGINFO handler? Yes that's what is being suggested. The output line will be the same, so no dump-output-parsing scripts should break (including Amanda's). Please, read the patches. > I'm pretty sure that this would not be a valid thing to do; Mmm, why? > SIGINFO itself is also problematic, since if you redirect output to a > file, etc., you'd really need to call fflush() Why? The line will eventually be saved without an explicit fflush(), but the proctitle will be set immediately... Besides, in case of dump, it is the stderr, that has no buffering, AFAIK :) > Also, printf() allocates memory for floating point, so if that > percentage is a floating point calculation, then you are in double > trouble, since you are not allowed to call malloc() in a signal > handler. That's interesting... I can modify it a bit, to round the percentage to fit the %d if called as a signal handler. Thanks. Anything else? -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message