This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone


On 11/13/2013 11:16 AM, Rich Felker wrote:

>> We are not using clone() in a manner that is strictly equivalent
>> to fork(). Libvirt is using clone() to create Linux containers
>> with new namespaces. eg we do 
>>
>>   clone(CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|CLONE_NEWNET|SIGCHLD)
> 
> Understood. I still call this a fork-like manner since it's not
> sharing VM or using CLONE_THREAD and using the default signal of
> SIGCHLD. BTW is there a reason to prefer this usage over regular fork
> followed by unshare()?

Yes.  Per 'man 2 unshare', CLONE_NEWPID is not supported with unshare(),
yet we require our child to have pid 1 in its new pid namespace.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]