[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: udhcpd: write leases on exit?
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2012-07-24 15:22:23
Message-ID: CAK1hOcOvSBn2Ck8T6LH7OW+GMxCb1naoL6FZmofHXzTZpcEcsg () mail ! gmail ! com
[Download RAW message or body]
On Thu, Jul 19, 2012 at 7:05 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Why udhcpd does not write leases file upon
> receipt of termination signal? Here's the
> code in question (networking/udhcp/udhcpd.c):
>
> switch (udhcp_sp_read(&rfds)) {
> case SIGUSR1:
> bb_info_msg("Received SIGUSR1");
> write_leases();
> /* why not just reset the timeout, eh */
> timeout_end = monotonic_sec() + server_config.auto_time;
> continue;
> case SIGTERM:
> bb_info_msg("Received SIGTERM");
> goto ret0;
> case 0: /* no signal: read a packet */
> break;
> default: /* signal or error (probably EINTR): back to select */
> continue;
> }
>
> I think there should be a call to write_leases()
> right after "Received SIGTERM" message, just like
> it is done in SIGUSR1 case?
Indeed. I added it.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic