[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 0/2] Make a wrapper for fork() - Take 2



This is an update to / deprecates the patchset I sent last night:

https://www.redhat.com/archives/libvir-list/2010-February/msg00580.html

I have corrected the problem found by Dan Berrange (neglecting to
restore the signal mask when fork() fails). Aside from that, and
corresponding comments in the commit logs, it is unchanged.

Here's the original intro email:

This was partly prompted by DV's suggestion last week.

The first of these patches creates a new function called virFork()
which behaves (almost) like fork() but takes care of some important
details that pretty much any call to fork() should be doing. The 2nd
switches three fork-calling functions in util.c over to using
virFork() instead of fork().

In the future, except for odd circumstances, code that needs to fork
should call virFork() instead, and if there is anything determined to
be universally necessary at fork-time, it should be added to virFork()
rather than to the callers of virFork(); hopefully this will ease
maintenance and reduce replicated bugs.

(Note that, while this is just an overall "code health" patch, a
couple bug fix patches I'll be submitting either tomorrow or Thursday
will assume it as a prerequisite).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]