aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-09 09:46:50 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-09 09:46:50 +1000
commit770fa771b6985c1ae38fe47c25e8d8c3061a0dfa (patch)
tree32a127f27bd7472709dcebf28c34f18df9b49c24 /parser.c
parent414fa591b8f15b2e106e1c59662fc2f5a3107443 (diff)
Unknown commands should set the status flag to 127, as in bash and friends
darcs-hash:20061008234650-ac50b-d41e6ec3d0a6088b0addf5721aecf8d98ed866cd.gz
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/parser.c b/parser.c
index 24530e2d..84c9a9e4 100644
--- a/parser.c
+++ b/parser.c
@@ -1858,7 +1858,7 @@ static int parse_job( process_t *p,
block_t *prev_block = current_block;
int prev_tokenizer_pos = current_tokenizer_pos;
-
+
current_tokenizer_pos = tok_get_pos( tok );
while( al_get_count( args ) == 0 )
@@ -2190,7 +2190,10 @@ static int parse_job( process_t *p,
execution of the file. Instead we let
p->actual_command be 0 (null), which will
cause the job to silently not execute. We
- also print an error message.
+ also print an error message and set the
+ status to 127 (This is the standard number
+ for this, used by other shells like bash
+ and zsh).
*/
if( wcschr( cmd, L'=' ) )
{
@@ -2244,7 +2247,7 @@ static int parse_job( process_t *p,
current_tokenizer_pos=tmp;
j->skip=1;
-
+ proc_set_last_status( STATUS_UNKNOWN_COMMAND );
}
}
}