[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-code
Subject:    Re: [osol-code] Process contract adoption
From:       Liane Praza <liane.praza () sun ! com>
Date:       2010-01-27 9:24:38
Message-ID: 4B600656.7030801 () sun ! com
[Download RAW message or body]

River Tarnell wrote:
> Hi,
> 
> I have an SMF-like server program which creates several process contracts to
> track child processes.  I would like this program to be able to restart
> itself and adopt the previous instance's contracts, so that its child
> processes can continue running while it restarts.  However, trying to
> open64(ctl, O_WRONLY) after restarting results in EACCES.  I assume this is
> due to the following text from contract(4):
> 
>       ctl                     Opening this  file  returns  a  file
>                               descriptor for contract id's control
>                               file. The open fails if the  opening
>                               process  does  not  hold contract id
>                               and the contract has not been inher-
>                               ited  by  the  process  contract  of
>                               which  the  opening  process  is   a
>                               member. See process(4).
>  
> If I understand this correctly, it seems like it's not possible to do what I 
> want?  Should I be doing this a different way?

Have you set CT_PR_INHERIT when creating the contracts so that they are 
adoptable?

liane
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic