Ian Collins wrote:
sprintf (start_command,"%s", "/opt/SUNWdsee/start-slapd");
(void) system(start_command);
In addition to the other reply, you shouldn't have to use the ghastly
(void)system() just to silence lint warnings.
Well, you *could* examine the return value and deal with any errors that
are returned.
Incidentally, that sprintf() call should generate a warning too, since
the "%s" format string doesn't limit the amount of output that could be
generated (though the fixed argument string does). The usual fix is to
replace sprintf() with snprintf(), though in this case I would replace
both lines with:
(void) system("/opt/SUNWdsee/start-slapd");
[assuming you ignore all the other advice about launching daemons using
SMF, not using system(), etc.]
Scott
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org