Durga Deep Tirunagari wrote:
> Folks,
> 
> we were running LINT against our code and it spewed out the following warning:
> 
> warning: avoid using system() as it invokes the shell (E_SEC_SHELL_WARN)
> 
>             
> 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 ?
> 
> _Durga


The obvious way is to not use the "system" command at all.  Try to find a
better way to exec the command that doesn't involve invoking a shell.

-Wyllys



Reply via email to