]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use virFork() in __virExec(), virFileCreate() and virDirCreate()
authorLaine Stump <laine@laine.org>
Thu, 18 Feb 2010 21:20:07 +0000 (22:20 +0100)
committerDaniel Veillard <veillard@redhat.com>
Thu, 18 Feb 2010 21:20:07 +0000 (22:20 +0100)
commit61497d958ef9ee045962e2727f1e8dab32285134
tree91c53679b287f91e2da741c311ac86e4bae84ba0
parentb4584612b41b9a574593b5261737efaf7b05135a
Use virFork() in __virExec(), virFileCreate() and virDirCreate()

For __virExec() this is a semantic NOP except for when fork()
fails. __virExec() would previously forget to restore the signal mask
in this case; virFork() corrects this behavior.

virFileCreate() and virDirCreate() gain the code to reset the logging
and properly deal with the signal handling race condition.

This also removes a log message that had a typo ("cannot fork o create
file '%s'") - this error is now logged in a more generic manner in
virFork() (more generic, but really just as informative, since the
fact that it's forking to create a file is immaterial to the fact that
it simply can't fork)

* src/util/util.c: use the generic virFork() in the 3 functions
src/util/util.c