Message ID | ZizBQ4KYRqO4B3Bc@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | main: Fix profiling on longjmp exit paths | expand |
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
Ensure that longjmp exit paths also write the profiling file. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)