| 341 | |
| 342 | #ifdef SHELL |
| 343 | int |
| 344 | dosh(void) |
| 345 | { |
| 346 | char *str; |
| 347 | |
| 348 | #ifdef SYSCF |
| 349 | if (!sysopt.shellers || !sysopt.shellers[0] |
| 350 | || !check_user_string(sysopt.shellers)) { |
| 351 | /* FIXME: should no longer assume a particular command keystroke */ |
| 352 | Norep("Unavailable command '!'."); |
| 353 | return 0; |
| 354 | } |
| 355 | #endif |
| 356 | if (child(0)) { |
| 357 | if ((str = getenv("SHELL")) != (char *) 0) |
| 358 | (void) execl(str, str, (char *) 0); |
| 359 | else |
| 360 | (void) execl("/bin/sh", "sh", (char *) 0); |
| 361 | raw_print("sh: cannot execute."); |
| 362 | exit(EXIT_FAILURE); |
| 363 | } |
| 364 | return 0; |
| 365 | } |
| 366 | #endif /* SHELL */ |
| 367 | |
| 368 | #if defined(SHELL) || defined(DEF_PAGER) || defined(DEF_MAILREADER) |
nothing calls this directly
no test coverage detected