Ensure that longjmp exit paths also write the profiling file. Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 5c49fdc..7beb280 100644 --- a/src/main.c +++ b/src/main.c @@ -112,7 +112,7 @@ main(int argc, char **argv) s = state; if (e == EXEND || e == EXEXIT || s == 0 || iflag == 0 || shlvl) - exitshell(); + goto exit; reset(); @@ -175,6 +175,7 @@ state3: state4: /* XXX ??? - why isn't this before the "if" statement */ cmdloop(1); } +exit: #if PROFILE monitor(0); #endif -- 2.39.2 -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt