Merge "Slightly refactor signal handling and fd closing"
am: 1f332b2dde

Change-Id: Ibe718bfe7d6ed9db0f24f50daf90a557932d0bd1