Close race in opening pid-file in network_chroot

The "get_pid_file()" method in network_chroot had a missing_ok
parameter which intended to avoid a test failure if the pid
file was missing.  Unfortunately this was implemented as a
"os.path.exists()" test, followed by an open.  This opens up
a small window where the pid file may disappear between the
test and the open attempt.  Instead, drop the test and catch
"not found" exceptions when we try to open the file.

BUG=chromium:325150
TEST=run this test

Change-Id: If8afee3d22c620534d8a36ce9a25ffc571ceeac6
Reviewed-on: https://chromium-review.googlesource.com/178732
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
1 file changed