On Mon, Mar 26, 2007 at 01:21:21PM -0700, Durga Deep Tirunagari wrote:
> Here is the code snippet:
> 
> 
>                 sprintf (start_command,"%s", "/opt/SUNWdsee/start-slapd");
>                 (void) system(start_command);
> 
> Any suggestions on getting rid of this warning ?

Find an existing OpenSolaris daemon that does fork() and:

        * return instead of exit if you're the parent.

        * Call one of the exec*() calls to launch your program in the child.

The IPv6 in.ndpd:

http://cvs.opensolaris.org/source/xref/netvirt/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/main.c#888

has a function you should adapt for your purposes.   It does cool stuff like
tie off the open file descriptors, too.

Dan

Reply via email to