Let's see if I can shed some light here... hoping I won't confuse you 
even more...

You can only adopt contracts that have CT_PR_INHERIT in its parameters. 
Also you can only adopt contracts that have been abandoned.
Last, you can only adopt contracts that are being held by the process 
contract which your process is a member of.

Example:

process contract CT has parameter CT_PR_REGENT meaning it can own 
process contracts.
CT has process P1 as member and P1 holds contracts CT1 and CT2, both 
with CT_PR_INHERIT set. P1 exits, implicitly abandoning CT1 and CT2.
At this point, CT becomes the owner of CT1 and CT2.
A second process P2, also member of CT, can then adopt CT1 and CT2.

If this is not accurate, I'd ask other members of the list to correct 
me. I hope you got the idea. Let me know if more clarification is necessary.

Antonello

Sushant Nirwan wrote:
> Hi All,
> I am trying to test ct_ctl_adopt() function of libcontract.so.1 
> According to the manpage of ct_ctl_adopt(), "The ct_ctl_adopt() function 
> adopts the contract referenced by the contract control file descriptor".
> But when I try to open the control file (ctl) in O_WRONLY mode of an any 
> existing contract of a system its show an error "permission denied ".
> 
> Can anybody tell me which contract I can adopt in my own created contract?
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org

Reply via email to