diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-03-09 12:05:43 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-09 13:48:01 +0000 |
commit | f1f045adf8d00549dd3efa3619e1162f9004b61e (patch) | |
tree | 78e974af7d863982207284f7d611b4db9901f73a /po-docs/libguestfs-docs.pot | |
parent | 99702fe443383707b9d9c1b84570baf3bebf9253 (diff) | |
download | libguestfs-f1f045adf8d00549dd3efa3619e1162f9004b61e.tar.gz libguestfs-f1f045adf8d00549dd3efa3619e1162f9004b61e.tar.xz libguestfs-f1f045adf8d00549dd3efa3619e1162f9004b61e.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.
Diffstat (limited to 'po-docs/libguestfs-docs.pot')
0 files changed, 0 insertions, 0 deletions