|
Lines 486-491
execute_in_shell(const char *cmd)
Link Here
|
| 486 |
if ((shell = getenv("SHELL")) == NULL) |
486 |
if ((shell = getenv("SHELL")) == NULL) |
| 487 |
shell = _PATH_BSHELL; |
487 |
shell = _PATH_BSHELL; |
| 488 |
|
488 |
|
|
|
489 |
if (access(shell, X_OK) == -1) { |
| 490 |
fatal("Shell \"%s\" is not executable: %s", |
| 491 |
shell, strerror(errno)); |
| 492 |
} |
| 493 |
|
| 489 |
/* Need this to redirect subprocess stdin/out */ |
494 |
/* Need this to redirect subprocess stdin/out */ |
| 490 |
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) |
495 |
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) |
| 491 |
fatal("open(/dev/null): %s", strerror(errno)); |
496 |
fatal("open(/dev/null): %s", strerror(errno)); |