commit | 841471374cfb9c0cf1356769510a59d0a398725f | [log] [tgz] |
---|---|---|
author | Avichal Rakesh <arakesh@google.com> | Thu Nov 11 17:47:11 2021 -0800 |
committer | Avichal Rakesh <arakesh@google.com> | Fri Nov 12 14:12:04 2021 -0800 |
tree | 6b5734013cc77b87a7722355a7a23a23f7a422a6 | |
parent | a14d983c9919a531347a6fc2d0f0f2324df2a72d [diff] |
Close `watch print` gracefully with user interrupt The print functionality of watch command needed to be stopped with a SIGINT. However, this could lead to some resources (for example the output file descriptor) not being closed properly. This CL adds a wrapper around the poll function allowing print command to wait for the user to press the return key and quit gracefully on user input. Bug: 199746421 Test: Tested Manually Change-Id: I2bb3ffd6b0711f40ecafe3a94c21e756ac2cd4e6