diff options
author | Ian Gudger <igudger@google.com> | 2018-08-21 13:48:10 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-21 13:49:18 -0700 |
commit | 45e759a1facdc8644025a84a68514ebad2813a90 (patch) | |
tree | 5879ff71eca7bce50cfe8d7ec34e06d00fc515c4 /runsc/container/container_test.go | |
parent | d6d165cb0b8147461388287ffd4cfee221940123 (diff) |
Build PCAP file with atomic blocking writes
The previous use of non-blocking writes could result in corrupt PCAP files if a
partial write occurs. Using (*os.File).Write solves this problem by not
allowing partial writes. This change does not increase allocations (in one path
it actually reduces them), but does add additional copying.
PiperOrigin-RevId: 209652974
Change-Id: I4b1cf2eda4cfd7f237a4245aceb7391b3055a66c
Diffstat (limited to 'runsc/container/container_test.go')
0 files changed, 0 insertions, 0 deletions