summaryrefslogtreecommitdiffhomepage
path: root/test/util/temp_path.cc
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-04-14 14:40:08 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-14 14:41:06 -0700
commit2dd6384de89a866bddb9184b8d7ab85b5b8f7100 (patch)
treee473a732cdd91bd0b3283cfc3729d08e335ab2fc /test/util/temp_path.cc
parent52b4b19249adfeba65fe6f0ef27111f2ed887888 (diff)
Fix cleanup around socketpair() failure to copy out FDs.
- Use the fs.File, rather than the vfs.FileDescription, in the VFS1 version. - Check for a nil fs.File/vfs.FileDescription before calling DecRef, which is possible if a racing dup2() or dup3() replaces the file descriptor between when it is installed and when it is returned. (This is not possible in Linux because Linux separates allocation of a file descriptor from binding an allocated file descriptor to a struct file, and dup2/dup3 return EBUSY if asked to replace an allocated but unbound file descriptor.) PiperOrigin-RevId: 306517101
Diffstat (limited to 'test/util/temp_path.cc')
0 files changed, 0 insertions, 0 deletions