I have the following scenario: A daemon (xend) under SMF control spawns a number of processes. I need to run these under a separate contract, so they aren't killed when xend restarts.
To avoid having to write a bunch of C and Python I'd like to use ctrun. However, it doesn't quite seem to do what I need. In particular, xend expects to get a PID it can later use to kill off the child process. The only way to get this from ctrun, however, is by parsing the human-readable output, which is obviously a bad idea (and besides, is commingled with the sub-process's output). I could workaround this by using: ctrun -l contract -o noorphan ... Then xend would kill ctrun, which in turn would kill the contract's members. But of course this leaves a completely unnecesary ctrun process running. Suggestions? There doesn't seem to be a great way of getting the process (or contract ID) back out. Hopefully I'm missing something obvious. regards john