Mike Frysinger ha scritto:
When the reboot program runs, it sends SIGHUP right after SIGTERM, so we
need to handle it as well.
Hi Mike,
I'm not sure that SIGHUP signal should be handled while rebooting system.
IMHO: sending SIGHUP signal while reboot system is not correct. Maybe,
only reboot from sysutils issue a SIGHUP to all process before sending
SIGKILL. For instance reboot from busybox don't issue any SIGHUP signal
but just SIGTERM and finally a SIGKILL.
I was looking for some specification on shutdown and signals in the net
but I haven't found any reliable note on that topic.
Just at http://linux.die.net/man/8/shutdown I read about SIGTERM but
nowhere I found anything about SIGHUP.
Anyway, on dhcpcd README there is a note:
[quote]
7. Other Information
dhcpcd sends DHCP_RELEASE message to the DHCP server, deletes the
/etc/dhcpc/dhcpcd-interface.cache file and brings the attached
network interface down when it gets SIGHUP signal. It will
not send DHCP_RELEASE message and will not delete
/etc/dhcpc/dhcpcd-interface.cache file in a case it gets
SIGTERM as normally happens upon reboot.
[quote]
So, when the system reboot if a SIGHUP signal is sent to dhcpcd the
result is that we lost the ip address.
I think that the only thing to do is remove from sysutils/reboot.c
kill(-1, SIGHUP);
I did it one year ago .... Now my devices preserve the ip address when I
reboot them ... :)
let me know If you have some specifications about the signals that
should issue while rebooting system. I can revert my modifications and
modify dhcpcd to change its behaviour.
Regards
--Michele
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev