9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ebf23c399468f70c8a7e3f4276166ef49a033ea4
parent a659629b7a926f984853e5a7b4d268cbb92294a9
Author: Dimitris Papastamos <dimitris.papastamos@arm.com>
Date:   Thu,  8 Nov 2018 11:09:49 +0000

[debuglang] Propagate command failure to the environment

Change-Id: Ic03de890be5d81785b06ac977ef6f88e6c72f268
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>

Diffstat:
Msrc/debuglang/debuglang.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/debuglang/debuglang.c b/src/debuglang/debuglang.c @@ -302,8 +302,10 @@ run(struct args *args) size_t len; char buffer[BUFSIZ]; - if (fgets(buffer, sizeof(buffer), stdin) == NULL) + if (fgets(buffer, sizeof(buffer), stdin) == NULL) { + args->status = 1; return -1; + } if ((len = strlen(buffer)) != 0) { if (buffer[len-1] != '\n') @@ -313,6 +315,8 @@ run(struct args *args) if (cmd) return cmd->eval(args); } + + args->status = 1; return -1; }