Re: proctitle progress reporting for dump(8)

2001-09-07 Thread Bruce Evans
On Wed, 5 Sep 2001, Mikhail Teterin wrote: On 5 Sep, Bruce Evans wrote: snprintf, strlen, vsnprintf, sysctl, sysctlbyname I think all of these are safe in practice. It also accesses some variables that are not safe to access in a signal handler (non-auto ones that

Re: proctitle progress reporting for dump(8)

2001-09-05 Thread Bruce Evans
On Wed, 5 Sep 2001, Terry Lambert wrote: Mikhail Teterin wrote: 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

Re: proctitle progress reporting for dump(8)

2001-09-05 Thread Mikhail Teterin
On 5 Sep, Bruce Evans wrote: snprintf, strlen, vsnprintf, sysctl, sysctlbyname I think all of these are safe in practice. It also accesses some variables that are not safe to access in a signal handler (non-auto ones that are not of type volatile sig_atomic_t or are

Re: proctitle progress reporting for dump(8)

2001-09-05 Thread Terry Lambert
Mikhail Teterin wrote: 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

Re: proctitle progress reporting for dump(8)

2001-09-04 Thread Terry Lambert
Mikhail Teterin wrote: On 1 Sep, Jeroen Ruigrok/Asmodai wrote: -On [20010901 19:00], Mikhail Teterin ([EMAIL PROTECTED]) 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

Re: proctitle progress reporting for dump(8)

2001-09-04 Thread Ruslan Ermilov
On Sun, Sep 02, 2001 at 04:15:14PM -0400, Mikhail Teterin wrote: [...] The SIGINFO handling seemed to be as simple as: --- main.c2001/07/09 03:06:56 1.26 +++ main.c2001/09/02 19:58:21 @@ -274,2 +274,4 @@ + if (signal(SIGINFO, SIG_IGN) != SIG_IGN) +

Re: proctitle progress reporting for dump(8)

2001-09-04 Thread Ruslan Ermilov
On Sat, Sep 01, 2001 at 10:36:45PM -0400, Garrett Wollman wrote: On Sun, 02 Sep 2001 00:39:22 +0200, Arne Dag Fidjestøl [EMAIL PROTECTED] said: Could you please clarify your position on this issue? Is setproctitle() the wrong way to do this, and if so, why? I don't expect

Re: proctitle progress reporting for dump(8)

2001-09-04 Thread Mikhail Teterin
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

Re: proctitle progress reporting for dump(8)

2001-09-02 Thread Mikhail Teterin
Ok, attached is the patch addding a function, which sets the proctitle to the last output message and several calls to this function in places, where it looked useful to me. May be, I added too many, and/or skipped some... Note, that I intentially did not put this functionality into the

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Garrett Wollman
On Sat, 1 Sep 2001 21:55:09 +0200, Jeroen Ruigrok/Asmodai [EMAIL PROTECTED] said: You mean dump should get a signal handler for SIGINFO to print/display the current status of the application? Yes! Just like in fsck, and for the same reasons. -GAWollman To Unsubscribe: send mail to [EMAIL

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Arne Dag Fidjestøl
On Sat, 1 Sep 2001 19:47:06 +0200, Jeroen Ruigrok/Asmodai [EMAIL PROTECTED] said: 79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished in 0:43 (dump) SIGINFO! SIGINFO! SIGINFO! You'd still need somewhere to put the status message; the dump process above has no controlling

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Garrett Wollman
On Sat, 01 Sep 2001 22:48:37 +0200, Arne Dag Fidjestøl [EMAIL PROTECTED] said: You'd still need somewhere to put the status message; the dump process above has no controlling terminal. If it has no controlling terminal then it's not going to receive ctty signals like SIGINFO. -GAWollman

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Arne Dag Fidjestøl
If it has no controlling terminal then it's not going to receive ctty signals like SIGINFO. Unless you send the signal manually. But I agree, SIGINFO is not a good solution here :) -adf To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Jeroen Ruigrok/Asmodai
-On [20010901 23:24], Arne Dag Fidjestøl ([EMAIL PROTECTED]) wrote: You'd still need somewhere to put the status message; the dump process above has no controlling terminal. Putting it into syslog might be a bit too verbose for this? -- Jeroen Ruigrok van der Werven/Asmodai

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Garrett Wollman
On Sat, 01 Sep 2001 23:08:48 +0200, Arne Dag Fidjestøl [EMAIL PROTECTED] said: But I agree, SIGINFO is not a good solution here :) I'm not sure who you're agreeing with, since I did not say that. -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Leif Neland
I like it. I se no problem. Does this look like a good idea to anyone else? 79239 ?? I 0:00,89 dump 0ushf 1048576 0 - /dev/da0h (dump) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Arne Dag Fidjestøl
On Sat, 01 Sep 2001 23:08:48 +0200, Arne Dag Fidjestøl [EMAIL PROTECTED] said: But I agree, SIGINFO is not a good solution here :) I'm not sure who you're agreeing with, since I did not say that. I apologize for the remark, however tongue-in-cheek it was intended. Could you please

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Mikhail Teterin
On 1 Sep, Jeroen Ruigrok/Asmodai wrote: -On [20010901 19:00], Mikhail Teterin ([EMAIL PROTECTED]) 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

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Garrett Wollman
On Sun, 02 Sep 2001 00:39:22 +0200, Arne Dag Fidjestøl [EMAIL PROTECTED] said: Could you please clarify your position on this issue? Is setproctitle() the wrong way to do this, and if so, why? I don't expect setproctitle() to be useful to me one way or the other. SIGINFO, on the other

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Jeroen Ruigrok/Asmodai
-On [20010901 19:00], Mikhail Teterin ([EMAIL PROTECTED]) wrote: 79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished in 0:43 (dump) Does anyone think, it is a bad idea? If no, I'll send-pr the patch... For me, dump is driven by a remote amanda and its nice to know, when it is

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Wilko Bulte
On Sat, Sep 01, 2001 at 07:45:17PM +0200, Leif Neland wrote: I like it. I se no problem. Does this look like a good idea to anyone else? 79239 ?? I 0:00,89 dump 0ushf 1048576 0 - /dev/da0h (dump) Nice idea IMO. -- | / o / / _ Arnhem, The Netherlands email:

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Garrett Wollman
On Sat, 1 Sep 2001 19:47:06 +0200, Jeroen Ruigrok/Asmodai [EMAIL PROTECTED] said: 79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished in 0:43 (dump) SIGINFO! SIGINFO! SIGINFO! -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Cy Schubert - ITSD Open Systems Group
In message [EMAIL PROTECTED], Garrett Wollman w rites: On Sat, 1 Sep 2001 19:47:06 +0200, Jeroen Ruigrok/Asmodai [EMAIL PROTECTED] said: 79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished in 0:4 3 (dump) SIGINFO! SIGINFO! SIGINFO! Much better idea! Regards,

Re: proctitle progress reporting for dump(8)

2001-09-01 Thread Jeroen Ruigrok/Asmodai
-On [20010901 21:48], Garrett Wollman ([EMAIL PROTECTED]) wrote: On Sat, 1 Sep 2001 19:47:06 +0200, Jeroen Ruigrok/Asmodai [EMAIL PROTECTED] said: 79240 ?? S 0:06,85 dump: /dev/da0h(0): 92.44% done, finished in 0:43 (dump) SIGINFO! SIGINFO! SIGINFO! Heh. :) Let me elaborate your, erm,