Background and forking process from SMF
Hello all,
this might be a stupid question, but i haven't find any clear answer, possibly since its difficult to find any good keywords to feed into a searchengine.
I started to write manifests for the local processes that i'm running on my server, however i got into some problems with certain applications that doesn't fork themself into the background properly.
Some examples are mysql, kerberos (i'm using a heimdal kerberos) and some other small applications.
In an old rc script i'ld simply start them by typing
/usr/local/sbin/foo &
or if i'm ambitious:
/usr/local/sbin/foo > /some/logfile 2>&1 &
but if i tries to start the application from a manifest like this:
[...]
<exec_method
type='method'
name='start'
exec='/usr/local/sbin/foo '
timeout_seconds='60' >
</exec_method>
[...]
.. the SMF will kill the process after the timeout since it didn't detach itself, adding a & to it simply wont work since its unparsable by the import.
Are there any solution to this? It seems wrong to create a shell script which just runs
/usr/local/sbin/foo &
.. when there should be a way to do this directly in SMF (at least IMHO).
Any ideas :-)?
.7/M.

