Return to lsystem.c CVS log | Up to [local] / src / usr.bin / less |
version 1.12, 2015/11/06 15:50:33 | version 1.13, 2015/11/07 18:07:44 | ||
---|---|---|---|
|
|
||
p = NULL; | p = NULL; | ||
if ((shell = lgetenv("SHELL")) != NULL && *shell != '\0') { | if ((shell = lgetenv("SHELL")) != NULL && *shell != '\0') { | ||
if (*cmd == '\0') { | if (*cmd == '\0') { | ||
p = save(shell); | p = estrdup(shell); | ||
} else { | } else { | ||
char *esccmd = shell_quote(cmd); | char *esccmd = shell_quote(cmd); | ||
if (esccmd != NULL) { | if (esccmd != NULL) { | ||
|
|
||
} | } | ||
if (p == NULL) { | if (p == NULL) { | ||
if (*cmd == '\0') | if (*cmd == '\0') | ||
p = save("sh"); | p = estrdup("sh"); | ||
else | else | ||
p = save(cmd); | p = estrdup(cmd); | ||
} | } | ||
(void) system(p); | (void) system(p); | ||
free(p); | free(p); |