|
Lines 3615-3622
Link Here
|
| 3615 |
|
3615 |
|
| 3616 |
if (command == 0) |
3616 |
if (command == 0) |
| 3617 |
{ |
3617 |
{ |
| 3618 |
internal_error (_("%s: command not found"), pathname); |
3618 |
SHELL_VAR *f, *v; |
| 3619 |
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ |
3619 |
WORD_LIST *cmdlist; |
|
|
3620 |
WORD_DESC *w; |
| 3621 |
int fval; |
| 3622 |
if( (posixly_correct || interactive_shell == 0) || |
| 3623 |
(f = find_function ("command_not_found_handle")) == 0) |
| 3624 |
{ |
| 3625 |
internal_error (_("%s: command not found"), pathname); |
| 3626 |
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ |
| 3627 |
} |
| 3628 |
w = make_word("command_not_found_handle"); |
| 3629 |
cmdlist = make_word_list(w, (WORD_LIST*)NULL); |
| 3630 |
|
| 3631 |
w = make_word(pathname); |
| 3632 |
cmdlist->next = make_word_list(w, (WORD_LIST*)NULL); |
| 3633 |
|
| 3634 |
fval = execute_shell_function (f, cmdlist); |
| 3635 |
exit(fval); |
| 3620 |
} |
3636 |
} |
| 3621 |
|
3637 |
|
| 3622 |
/* Execve expects the command name to be in args[0]. So we |
3638 |
/* Execve expects the command name to be in args[0]. So we |