[Devel] Re: [PATCH v7 09/10] IPC: message queue copy feature introduced

Stanislav Kinsbursky skinsbursky at parallels.com
Thu Oct 18 05:41:34 PDT 2012


18.10.2012 16:09, Michael Kerrisk (man-pages) пишет:
>>> Is there somewhere a *detailed* description of how this feature would
>>> be used? Lacking that, it's really hard to see how anything sane and
>>> reliable can be done with MSG_COPY.
>>>
>>
>> These patches are used by CRIU already.
>> So, you can have a look at the CRIU source code:
>>
>> http://git.criu.org/?p=crtools.git;a=blob;f=ipc_ns.c;h=9e259fefcfc04ec0556bb722921545552e1c69f3;hb=HEAD
>>
>> Sanity and reliability on the level you are talking about can be achieved,
>> only if you'll freeze all message users before peeking.
>
> Okay -- that's the piece I was looking for. Thanks.
>
> In this scenario, how do you find all of the message users?

It looks like there is no way to how find these users.
But I don't really think, that this is necessary.
I.e. nothing protects the queue from reading by some alien (not expected) 
process in real life.

> Or do you simply ensure that everything is frozen beforehand?
>

In this particular case - yes.

-- 
Best regards,
Stanislav Kinsbursky




More information about the Devel mailing list