summaryrefslogtreecommitdiffstats
path: root/python/examples/guestfs-python.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-09 12:05:43 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-13 09:25:31 +0000
commitdf2436d999ee7c57e1a37d8b2cfada7e69cbda05 (patch)
tree17f201d8f3087e472b30abf5ee78a52cad683ea9 /python/examples/guestfs-python.pod
parentf6e8b898be60e441390e6cd0734ae0a011f832d4 (diff)
downloadlibguestfs-df2436d999ee7c57e1a37d8b2cfada7e69cbda05.tar.gz
libguestfs-df2436d999ee7c57e1a37d8b2cfada7e69cbda05.tar.xz
libguestfs-df2436d999ee7c57e1a37d8b2cfada7e69cbda05.zip
Close all file descriptors and remove all signal handlers in the recovery process.
If the parent process uses a pipe (or any fd, but pipes are a particular problem), then the recovery process would hold open the file descriptor(s) of the pipe, meaning that it could not be fully closed in the parent. Because the recovery process doesn't use exec(2), this wasn't avoidable even using FD_CLOEXEC. Avoid this by closing all file descriptors when starting the recovery process. After discussion with Dan Berrange, he points out that it's also a good idea to set signal handlers to the default after forking, so that any signal handlers set up in the parent don't affect the child. (cherry picked from commit f1f045adf8d00549dd3efa3619e1162f9004b61e)
Diffstat (limited to 'python/examples/guestfs-python.pod')
0 files changed, 0 insertions, 0 deletions