Please honor the reply-to and send followups to 
[EMAIL PROTECTED]

Michal Rotkiewicz writes:
> Hi,
> Scenario:
> 1) log in by telnet
> 2) run some demon (but not by svcadm)
> 3)do: svcs -p telnet
> Why svcs shows that demon is releated to telnet ?
> It's a demon so it parent process is init NOT telnet !.
> In this situation when you disable telnet demon will be killed!!
> It's a big problem for legacy code.
> If you attach demon for svcadm and run it "e.g svcadm enable mydemon" then it
>  works as expected: disabling telnet does not affect demon.

This is because service boundaries are decided by the contract, rather 
than the process parent.  When the service is disabled all processes in 
the contract are stopped.  (I went through some details on this in:
http://blogs.sun.com/roller/page/lianep?entry=smf_5_and_fault_isolation
if you'd like some more background.)

You can look at the contract tree by using "ptree -c".  To see it for 
telnet only, you can use:
   $ ptree -c `pgrep telnet`

Unfortunately, it shouldn't be this way -- user processes under all 
forms of login should be in a separate contract.  Nico fixed this for 
ssh, and we're tracking the fix for telnet under:
    5100725 all forms of login (e.g. telnet, rlogin, etc.) must be made 
contract-aware

To work around this, you can use ctrun(1) to execute your daemon in a 
separate contract, or use ssh rather than telnet.

Sorry that you're hitting this bug.  :(  I've updated it with the 
workarounds described above and increased its priority.

liane

_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to