From owner-freebsd-arch Mon Sep 3 23:28:53 2001 Delivered-To: freebsd-arch@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.121.12]) by hub.freebsd.org (Postfix) with ESMTP id 7B8A737B407; Mon, 3 Sep 2001 23:28:48 -0700 (PDT) Received: from mindspring.com (dialup-209.247.140.38.Dial1.SanJose1.Level3.net [209.247.140.38]) by harrier.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id XAA15274; Mon, 3 Sep 2001 23:28:22 -0700 (PDT) Message-ID: <3B9474B1.18EC6692@mindspring.com> Date: Mon, 03 Sep 2001 23:29:05 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mikhail Teterin Cc: asmodai@wxs.nl, current@freebsd.org, arch@freebsd.org Subject: Re: proctitle progress reporting for dump(8) References: <200109012258.f81MwAo84783@aldan.algebra.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mikhail Teterin wrote: > On 1 Sep, Jeroen Ruigrok/Asmodai wrote: > > -On [20010901 19:00], Mikhail Teterin (mi@aldan.algebra.com) wrote: > >>79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished > >>in 0:43 (dump) > > > > > Looks nice. Would definately be an improvement. > > > > 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? I'm pretty sure that this would not be a valid thing to do; SIGINFO itself is also problematic, since if you redirect output to a file, etc., you'd really need to call fflush() in the signal handler, which is not supposed to be done, as it is not one of the permitted calls. 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. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message