/* Optimize 'echo' command. People use this for logging or tracing, so avoid forking a child. Do this only if construct_command_argv successfully avoided using a shell. */ if (argv[0] && !strcmp (argv[0], "echo")) { char *text = strlen (p) > 5 ? p + 5 : ""; fputs (text, stdout); fputc ('\n', stdout); fflush (stdout); free (argv[0]); free (argv); goto next_command; }