[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Ever wanted to change the verbosity level of a running fetchnews?



On Thu, Apr 27, 2000 at 08:08:19PM +0100, Colin Brough wrote:
> I've occasionally wanted to change the verbosity level of a running
> fetchnews process, typically because its taking a long time in a
> newsgroup, and I want to see that it is still working... I usually run

In this case I usually do a 
strace -p `cat /var/lock/news/fetchnews.lck'.

> + static void catch_sig_usr( int signo )
> + {
> +     if (signo == SIGUSR1)
> +     {
> +         verbose++;
> +     }

Please note, that within a signal handler you are only allowed to
call a small set of reentrant functions, longjmp() and modify
variables of type volatile sig_atomic_t. So you better change the
type of verbose as well. Shouldn't be a problem. Otherwise, I
like it. Although the strace solution is probably more Unix like.

Regards,
	Jo:rg

-- 
Fortune cookie of the day:
According to the obituary notices, a mean and unimportant person never dies.

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list