libxl: get_reaper_lock_and_uid: Document fd handling
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 2 Jan 2019 11:59:46 +0000 (11:59 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 Jan 2019 17:34:26 +0000 (17:34 +0000)
commit93a62c544e20ba9e141e411bbaae3d65259d13a3
tree5824fbcbb60eb7b700b07bd6457f2960c1fb8bf5
parent1bce5f9baf0f4a4e50722f32b44afe4fdefc6b35
libxl: get_reaper_lock_and_uid: Document fd handling

Coverity understandably complains that get_reaper_lock_and_uid leaks
the fd and hence open-file.  But this is intentional: the lock becomes
owned by the child process as a whole, which is entirely the property
of libxl.

(The coding style here in this subprocess is a bit anomalous but it's
probably not worth it to convert get_reaper_lock_and_uid to `goto out'
style and have it explicitly return the fd number.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
tools/libxl/libxl_dm.c