Hi, This was sent to me but I'm not able to address this in a timely manner. Looking for help from the SMF community for this one. Thanks! -CT
> I'm trying to create a new contract with the following code > int main() > { > int tmpl_fd; > ctid_t ctid; > > if ((tmpl_fd = open64("/system/contract/process/template", O_RDWR)) > == -1) { > perror("Can't open /system/contract/process/template \n"); > return -1; > }else > printf("open /system/contract/process/template \n"); > > if (ct_tmpl_activate(tmpl_fd) != 0) { > perror("Can't activate process contract template"); > return -1; > }else > printf("Activate contract template \n"); > > if (ct_tmpl_create(tmpl_fd, &ctid) != 0) { > perror("Can't create process contract template"); > return -1; > }else > printf("Create contract template ctid is -: %d\n",ctid); > > return 0; > } > > However, I?m getting an error "Can't create process contract template: > Invalid argument". According to the man?pages of ct_tmpl_create() we have > to pass the file descriptor of the templates, which is I'm doing. > > When I go through the source code of contract I found that in file > "...../usr/src/uts/commmon/os/contract.c" there is function > ctmpl_create_inval() which is called at the time of calling > ct_tmpl_create(). > But this function is always return EINVAL (invalid argument). > > Help me to sort out this problem, since ct_tmpl_create() is not implemented > in any of the tools of open solaris. >