commit | c4f9aa0e795b6f79c628a763831d4dc6c01fb72b | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@chromium.org> | Thu Aug 15 19:23:13 2013 -0700 |
committer | ChromeBot <chrome-bot@google.com> | Fri Aug 16 14:17:49 2013 -0700 |
tree | 7f38d9e451f141dd842a31231e8165daf0286cc1 | |
parent | 7cd4572126da015b195caf82449c14b4065c4c59 [diff] |
shill: provide ability to configure children to terminate with parent If shill crashes and restarts, it will re-initialize its state about its peer daemons (e.g. wpasupplicant, ModemManager). Child processes, however, do not always provide a way to query their current state. For dhcpcd, we deal with this problem by having the child process (dhcpcd) monitor D-Bus events to determine when shill exits. When that occurs, dhcpcd terminates itself. In this way, a newly spawned shill process doesn't have to worry about an old dhcpcd conflicting with one fired off by the (new) shill process. Since pppd doesn't have integrated D-Bus support, doing the same for pppd could be hairy. Instead, use prctl() to ask the kernel to deliver SIGTERM to pppd when shill exits. BUG=chromium:261710 TEST=manual Manual test ----------- - plug in ppp dongle - wait for network to connect - killall -9 shill - egrep 'pppd.+Terminating on signal 15' /var/log/net.log Change-Id: I7513ccfa8de0b154d233d8a4d6f1bc701af32974 Reviewed-on: https://gerrit.chromium.org/gerrit/66031 Commit-Queue: mukesh agrawal <quiche@chromium.org> Reviewed-by: mukesh agrawal <quiche@chromium.org> Tested-by: mukesh agrawal <quiche@chromium.org>